diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-03-27 00:27:34 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-03-27 16:22:57 -0300 |
commit | 66b01c9a0c8a9d6b5eff7199042fbdf8b5cf523c (patch) | |
tree | c24096d2d239800d11ccef867d465bbb45f8eaf8 /gst-libs/gst/adaptivedemux | |
parent | 45422791f7f244900f3f76e7e9d7497ef1b88075 (diff) | |
download | gstreamer-plugins-bad-66b01c9a0c8a9d6b5eff7199042fbdf8b5cf523c.tar.gz |
adaptivedemux: do not try to advance fragment if there is none
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
Diffstat (limited to 'gst-libs/gst/adaptivedemux')
-rw-r--r-- | gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index cf4a31731..1c6a35966 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -2395,7 +2395,13 @@ gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux, 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 (); |