diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-01-31 17:18:46 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-01-31 17:18:46 +0000 |
commit | 930e3e5c4a8b2304ed3799424a52570dc24fc662 (patch) | |
tree | ca678801496071d9453d6a5c64171349ccd7a7cc /gst-libs/gst/app/gstappsink.c | |
parent | b3595da577db884a554bdd372d4d45866987d19c (diff) | |
download | gst-plugins-bad-930e3e5c4a8b2304ed3799424a52570dc24fc662.tar.gz gst-plugins-bad-930e3e5c4a8b2304ed3799424a52570dc24fc662.tar.bz2 gst-plugins-bad-930e3e5c4a8b2304ed3799424a52570dc24fc662.zip |
gst-libs/gst/app/gstappsink.c: Really clean up the queue instead of just unreffing all buffers in it.
Original commit message from CVS:
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose):
Really clean up the queue instead of just unreffing all buffers
in it.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_base_init),
(gst_app_src_class_init), (gst_app_src_init),
(gst_app_src_dispose), (gst_app_src_finalize):
Fix dispose/finalize.
Diffstat (limited to 'gst-libs/gst/app/gstappsink.c')
-rw-r--r-- | gst-libs/gst/app/gstappsink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/app/gstappsink.c b/gst-libs/gst/app/gstappsink.c index 579a7afd..d727efcf 100644 --- a/gst-libs/gst/app/gstappsink.c +++ b/gst-libs/gst/app/gstappsink.c @@ -232,6 +232,7 @@ static void gst_app_sink_dispose (GObject * obj) { GstAppSink *appsink = GST_APP_SINK (obj); + GstBuffer *buffer; if (appsink->caps) { gst_caps_unref (appsink->caps); @@ -241,7 +242,10 @@ gst_app_sink_dispose (GObject * obj) gst_buffer_unref (appsink->preroll); appsink->preroll = NULL; } - g_queue_foreach (appsink->queue, (GFunc) gst_mini_object_unref, NULL); + g_mutex_lock (appsink->mutex); + while ((buffer = g_queue_pop_head (appsink->queue))) + gst_buffer_unref (buffer); + g_mutex_unlock (appsink->mutex); G_OBJECT_CLASS (parent_class)->dispose (obj); } |