summaryrefslogtreecommitdiff
path: root/gst/asfdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-05-11 09:21:09 +0200
committerEdward Hervey <bilboed@bilboed.com>2018-05-22 06:52:58 +0200
commitfd59ea8c7d3d98a7302a12c390c501936e8a0ab4 (patch)
tree1c4a15f4b6a1052af52522f994e26cde699f0717 /gst/asfdemux
parent906b37de60998831cd165e4f23707cc8cfb610c5 (diff)
downloadgstreamer-plugins-ugly-fd59ea8c7d3d98a7302a12c390c501936e8a0ab4.tar.gz
asfdemux: Only send flush event on seeking flushes
And not on all the time
Diffstat (limited to 'gst/asfdemux')
-rw-r--r--gst/asfdemux/gstasfdemux.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 80c4fa75..795c82fa 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -732,15 +732,13 @@ gst_asf_demux_handle_seek_event (GstASFDemux * demux, GstEvent * event)
* forever */
GST_PAD_STREAM_LOCK (demux->sinkpad);
- /* we now can stop flushing, since we have the stream lock now */
- fevent = gst_event_new_flush_stop (TRUE);
- gst_event_set_seqnum (fevent, seqnum);
- gst_pad_push_event (demux->sinkpad, gst_event_ref (fevent));
-
- if (G_LIKELY (flush))
+ if (G_LIKELY (flush)) {
+ /* we now can stop flushing, since we have the stream lock now */
+ fevent = gst_event_new_flush_stop (TRUE);
+ gst_event_set_seqnum (fevent, seqnum);
+ gst_pad_push_event (demux->sinkpad, gst_event_ref (fevent));
gst_asf_demux_send_event_unlocked (demux, fevent);
- else
- gst_event_unref (fevent);
+ }
/* operating on copy of segment until we know the seek worked */
segment = demux->segment;