dashdemux: properly reset stream status after a flush
authorThiago Santos <thiago.sousa.santos@collabora.com>
Thu, 14 Feb 2013 20:39:35 +0000 (17:39 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 8 May 2013 21:14:41 +0000 (18:14 -0300)
The stream eos/end of period status must also be reset after a flushing
seek. This makes seeking after EOS work.

ext/dash/gstdashdemux.c

index 2cea002..a699d3f 100644 (file)
@@ -614,7 +614,11 @@ gst_dash_demux_src_event (GstPad * pad, GstEvent * event)
             GstDashDemuxStream *stream;
 
             stream = iter->data;
+            stream->has_data_queued = FALSE;
             stream->need_header = TRUE;
+            stream->download_end_of_period = FALSE;
+            stream->stream_end_of_period = FALSE;
+            stream->stream_eos = FALSE;
             gst_pad_push_event (stream->pad, gst_event_new_flush_stop ());
           }
         }
@@ -628,6 +632,7 @@ gst_dash_demux_src_event (GstPad * pad, GstEvent * event)
         }
         demux->need_segment = TRUE;
         gst_uri_downloader_reset (demux->downloader);
+        GST_DEBUG_OBJECT (demux, "Resuming tasks after seeking");
         gst_dash_demux_resume_download_task (demux);
         gst_dash_demux_resume_stream_task (demux);
         g_static_rec_mutex_unlock (&demux->stream_task_lock);