Fix #1759 (regression) resume correctly after seek
Created by: JontyUsborne
Fixes #1759 (closed) caused by 930717e8.
Original reason for 930717e8 was a problem were segment lists were updated out of order such that the previously fetched index was sometimes no longer valid. For instance, if a paused player drifted outside of the rewind window, when seeking back, the getSegmentByIndex
and getIndexForSegments
functions would be using different segment lists.
Moving updateSegments
fixed the issue, but caused problems for other streams where the segment list needs to be updated on every getSegmentRequestForTime
call.
66501783 now works, but the whole thing could probably do with refactoring and the first updateSegments
should probably go somewhere else.