mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
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
This commit is contained in:
parent
2273c15f15
commit
22c7559152
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -74,6 +74,7 @@ struct _GstDashDemuxStream
|
|||
|
||||
gboolean stream_eos;
|
||||
gboolean need_header;
|
||||
gboolean discont;
|
||||
|
||||
/* Download task */
|
||||
GMutex download_mutex;
|
||||
|
|
Loading…
Reference in a new issue