It might return OK from subclasses and it could cause a bitrate
renegotiation. For DASH and MSS that is ok as they won't expose
new pads as part of this but it can cause issues for HLS as
it will expose new pads, leading to pads that will only have EOS
that cause decodebin to fail
https://bugzilla.gnome.org/show_bug.cgi?id=745905
if (GST_CLOCK_TIME_IS_VALID (duration))
stream->segment.position += duration;
- ret = klass->stream_advance_fragment (stream);
+
+ if (gst_adaptive_demux_is_live (demux)
+ || gst_adaptive_demux_stream_has_next_fragment (demux, stream)) {
+ ret = klass->stream_advance_fragment (stream);
+ } else {
+ ret = GST_FLOW_EOS;
+ }
stream->download_start_time = stream->download_chunk_start_time =
g_get_monotonic_time ();