adaptivedemux: fix stream exposure condition
authorMichael Olbrich <m.olbrich@pengutronix.de>
Thu, 18 Aug 2016 08:06:27 +0000 (10:06 +0200)
committerJan Schmidt <jan@centricular.com>
Mon, 22 Aug 2016 15:40:39 +0000 (01:40 +1000)
commit0a63569fd16354464df9b3e3629fb56c4f9b3c43
tree9061d2be17694fb039646937586ce4b5166562c9
parent3550fb3a6a6a3738e278589f926a479b922c8cc4
adaptivedemux: fix stream exposure condition

The new streams should not be exposed until all streams are done with the
current fragment. The old code is incorrect and actually only checked the
current stream. Fix this by properly checking all streams.

Also, ignore the current stream. The code is only reached when the current
stream finished downloading and since
07f49f15b1196cc9fa0d45af91149a35fce123b9 ("adaptivedemux: On EOS, handle it
before waking download loop") download_finished is set after
gst_adaptive_demux_stream_advance_fragment_unlocked() is called.

Without this HLS playback with multiple streams is broken, because the new
streams are never exposed.

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