diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index ffb1c748c7..90e48f5b18 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -2181,10 +2181,6 @@ gst_dash_demux_stream_download_uri (GstDashDemux * demux, } if (G_LIKELY (stream->last_ret == GST_FLOW_OK)) { - /* flush the proxypads so that the EOS state is reset */ - gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_start ()); - gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_stop (TRUE)); - stream->download_start_time = g_get_monotonic_time (); gst_element_sync_state_with_parent (stream->src); @@ -2198,6 +2194,10 @@ gst_dash_demux_stream_download_uri (GstDashDemux * demux, stream->last_ret = GST_FLOW_CUSTOM_ERROR; } + /* flush the proxypads so that the EOS state is reset */ + gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_start ()); + gst_pad_push_event (stream->src_srcpad, gst_event_new_flush_stop (TRUE)); + gst_element_set_state (stream->src, GST_STATE_READY); }