From f6c6d9c280f94e66fe29531ac5a38d7add051407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 4 Sep 2014 18:20:58 +0300 Subject: [PATCH] hlsdemux: Don't send flush events to deactivated pads https://bugzilla.gnome.org/show_bug.cgi?id=736012 --- ext/hls/gsthlsdemux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index bf4a273e0c..e4949950e9 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -2090,10 +2090,6 @@ gst_hls_demux_get_next_fragment (GstHLSDemux * demux, } if (G_LIKELY (demux->last_ret == GST_FLOW_OK)) { - /* flush the proxypads so that the EOS state is reset */ - gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_start ()); - gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_stop (TRUE)); - demux->download_start_time = g_get_monotonic_time (); download_start_time = gst_util_get_timestamp (); gst_element_sync_state_with_parent (demux->src); @@ -2109,6 +2105,10 @@ gst_hls_demux_get_next_fragment (GstHLSDemux * demux, } g_mutex_unlock (&demux->fragment_download_lock); + /* flush the proxypads so that the EOS state is reset */ + gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_start ()); + gst_pad_push_event (demux->src_srcpad, gst_event_new_flush_stop (TRUE)); + if (demux->last_ret != GST_FLOW_OK) { gst_element_set_state (demux->src, GST_STATE_NULL); if (*err == NULL) {