From 8526ba627311e9c1d7bc700320184417e6f367cf Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 14 Jul 2014 13:34:25 +0200 Subject: [PATCH] composition: Push flush events *downstream* not 'somewhere' :) Co-Authored by: Mathieu Duponchelle --- gnl/gnlcomposition.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index c3671bd744..0505bbf7fb 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -2150,6 +2150,7 @@ _set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream) if (ptarget) { GstEvent *flush_event; + GstPad *peer = gst_pad_get_peer (GNL_OBJECT_SRC (comp)); /* Make sure that between the flush_start/flush_stop * and the time we set the current_bin to READY, no @@ -2165,13 +2166,13 @@ _set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream) priv->flush_seqnum = gst_event_get_seqnum (flush_event); GST_ERROR_OBJECT (comp, "sending flushes downstream with seqnum %d", priv->flush_seqnum); - gst_element_send_event (priv->current_bin, flush_event); + gst_pad_send_event (peer, flush_event); flush_event = gst_event_new_flush_stop (TRUE); gst_event_set_seqnum (flush_event, priv->flush_seqnum); - gst_element_send_event (priv->current_bin, flush_event); + gst_pad_send_event (peer, flush_event); - gst_object_unref (ptarget); + gst_object_unref (peer); } }