From e5c9ef134186622ac5fadb37acb33aa32ef10aa4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 17 Jul 2005 22:22:52 +0000 Subject: [PATCH] gst/gstqueue.c: Fix nasty refcount bug. Original commit message from CVS: * gst/gstqueue.c: (gst_queue_handle_sink_event): Fix nasty refcount bug. --- ChangeLog | 5 +++++ gst/gstqueue.c | 6 +++--- plugins/elements/gstqueue.c | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96b7e7a..57335cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 Wim Taymans + + * gst/gstqueue.c: (gst_queue_handle_sink_event): + Fix nasty refcount bug. + 2005-07-16 Philippe Khalaf * gst/elements/gstfdsrc.c: * gst/elements/gstfdsrc.h: diff --git a/gst/gstqueue.c b/gst/gstqueue.c index e251f2e..0629763 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -26,8 +26,6 @@ #include "gst_private.h" #include "gstqueue.h" -#include "gstscheduler.h" -#include "gstpipeline.h" #include "gstevent.h" #include "gstinfo.h" #include "gsterror.h" @@ -471,7 +469,8 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event) case GST_EVENT_FLUSH: STATUS (queue, "received flush event"); /* forward event */ - gst_pad_event_default (pad, event); + gst_event_ref (event); + gst_pad_push_event (queue->srcpad, event); if (GST_EVENT_FLUSH_DONE (event)) { GST_QUEUE_MUTEX_LOCK; queue->flushing = FALSE; @@ -493,6 +492,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event) gst_pad_pause_task (queue->srcpad); GST_CAT_LOG_OBJECT (queue_dataflow, queue, "loop stopped"); } + gst_event_unref (event); goto done; case GST_EVENT_EOS: STATUS (queue, "received EOS"); diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index e251f2e..0629763 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -26,8 +26,6 @@ #include "gst_private.h" #include "gstqueue.h" -#include "gstscheduler.h" -#include "gstpipeline.h" #include "gstevent.h" #include "gstinfo.h" #include "gsterror.h" @@ -471,7 +469,8 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event) case GST_EVENT_FLUSH: STATUS (queue, "received flush event"); /* forward event */ - gst_pad_event_default (pad, event); + gst_event_ref (event); + gst_pad_push_event (queue->srcpad, event); if (GST_EVENT_FLUSH_DONE (event)) { GST_QUEUE_MUTEX_LOCK; queue->flushing = FALSE; @@ -493,6 +492,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event) gst_pad_pause_task (queue->srcpad); GST_CAT_LOG_OBJECT (queue_dataflow, queue, "loop stopped"); } + gst_event_unref (event); goto done; case GST_EVENT_EOS: STATUS (queue, "received EOS"); -- 2.7.4