adaptivedemux: Handle prepared streams on seeks
authorEdward Hervey <edward@centricular.com>
Tue, 9 May 2017 09:41:49 +0000 (11:41 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 13 Jul 2017 09:15:38 +0000 (11:15 +0200)
commitb80b11cce97b8e5432c0ca5a4f50b432b82dd130
tree52f48ecf9ed5fe956104c39dbdaf1cdec609195a
parentdfbf187073a82288c6b51f591b3b82c37b2ffade
adaptivedemux: Handle prepared streams on seeks

This is a race that was exposed by the {hls|dash}.scrub_forward_seeking
validate test.

The "race" is that a subclass might want to change format, causing
a new stream to be created (but not exposed/switched yet) and put on the
prepared_streams list. That stream will have values (including pending
segment) from the pre-seek state.

Before the stream is exposed/switched, a new seek comes in and the stream
values get updated ... but the ones that will be changed don't get updated
causing them to push out wrong segments once they are exposed.

https://bugzilla.gnome.org/show_bug.cgi?id=773159
gst-libs/gst/adaptivedemux/gstadaptivedemux.c