diff options
author | Matthieu Bouron <matthieu.bouron@collabora.com> | 2014-09-09 13:12:31 +0200 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-09-24 13:30:20 -0300 |
commit | 22c7559152f77c62e12f80bb33be5429144d46ad (patch) | |
tree | f1fff8e926dfa7852c4902d6e6f8ff68a8aba425 /ext/dash/gstdashdemux.c | |
parent | 2273c15f15bc2a847dc78bfeb309198d52557989 (diff) | |
download | gstreamer-plugins-bad-22c7559152f77c62e12f80bb33be5429144d46ad.tar.gz |
dashdemux: mark first buffer as discont after restarting a download task
Mark first buffer as discont after restarting a download task, so
downstream can reset its state to properly handle the new fragment.
Related issue: https://bugzilla.gnome.org/show_bug.cgi?id=736318
https://bugzilla.gnome.org/show_bug.cgi?id=736319
Diffstat (limited to 'ext/dash/gstdashdemux.c')
-rw-r--r-- | ext/dash/gstdashdemux.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index cd87c9c6f..c6aa46a71 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -610,6 +610,7 @@ gst_dash_demux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) stream->last_ret = GST_FLOW_OK; stream->restart_download = TRUE; stream->need_header = TRUE; + stream->discont = TRUE; g_mutex_unlock (&stream->fragment_download_lock); GST_DEBUG_OBJECT (stream->pad, "Restarting download loop"); gst_task_start (stream->download_task); @@ -718,6 +719,7 @@ gst_dash_demux_setup_all_streams (GstDashDemux * demux) stream = g_new0 (GstDashDemuxStream, 1); stream->demux = demux; stream->active_stream = active_stream; + stream->discont = FALSE; caps = gst_dash_demux_get_input_caps (demux, active_stream); g_rec_mutex_init (&stream->download_task_lock); @@ -1990,6 +1992,11 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE; } + if (stream->discont) { + discont = TRUE; + stream->discont = FALSE; + } + if (discont) { GST_DEBUG_OBJECT (stream->pad, "Marking fragment as discontinuous"); GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); |