From: Wim Taymans Date: Wed, 21 Nov 2007 13:47:52 +0000 (+0000) Subject: libs/gst/base/gstbasesink.c: Only send upstream events upstream. Fixes #498746. X-Git-Tag: RELEASE-0_10_16~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4c503929ac7b2a69ca3119ef2adb9d9f7d82b18;p=platform%2Fupstream%2Fgstreamer.git libs/gst/base/gstbasesink.c: Only send upstream events upstream. Fixes #498746. Original commit message from CVS: * libs/gst/base/gstbasesink.c: (gst_base_sink_send_event): Only send upstream events upstream. Fixes #498746. --- diff --git a/ChangeLog b/ChangeLog index f441d14fad..580a03b51b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-21 Wim Taymans + + * libs/gst/base/gstbasesink.c: (gst_base_sink_send_event): + Only send upstream events upstream. Fixes #498746. + 2007-11-21 Wim Taymans Patch by: Laurent Glayal diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 3986832c51..0874e94d1a 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -2927,7 +2927,10 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event) { GstPad *pad; GstBaseSink *basesink = GST_BASE_SINK (element); - gboolean forward = TRUE, result = TRUE; + gboolean forward, result = TRUE; + + /* only push UPSTREAM events upstream */ + forward = GST_EVENT_IS_UPSTREAM (event); switch (GST_EVENT_TYPE (event)) { case GST_EVENT_LATENCY: @@ -2944,7 +2947,6 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event) /* don't forward, yet */ forward = FALSE; - gst_event_unref (event); break; } default: @@ -2959,6 +2961,9 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event) result = gst_pad_push_event (pad, event); gst_object_unref (pad); + } else { + /* not forwarded, unref the event */ + gst_event_unref (event); } return result; }