From b02dc1bf6a6766a19b91ab038a716c0360efa1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 7 Jul 2008 09:55:41 +0000 Subject: [PATCH] gst/playback/gstdecodebin.c: And ref the pad before returning it again when linking to the queue failed. Otherwise we... Original commit message from CVS: * gst/playback/gstdecodebin.c: (add_raw_queue): And ref the pad before returning it again when linking to the queue failed. Otherwise we will unref the pad twice later and things break. --- ChangeLog | 6 ++++++ gst/playback/gstdecodebin.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index da1a706926..faf4483e7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-07-07 Sebastian Dröge + + * gst/playback/gstdecodebin.c: (add_raw_queue): + And ref the pad before returning it again when linking to the queue + failed. Otherwise we will unref the pad twice later and things break. + 2008-07-07 Sebastian Dröge * gst/playback/gstdecodebin.c: (add_raw_queue): diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index cbca08c59c..94e64bc9c0 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -747,7 +747,7 @@ add_raw_queue (GstDecodeBin * decode_bin, GstPad * pad) gst_object_unref (queuesrcpad); gst_object_unref (queuesinkpad); gst_bin_remove (GST_BIN (decode_bin), queue); - return pad; + return gst_object_ref (pad); } decode_bin->queues = g_list_append (decode_bin->queues, queue);