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.
This commit is contained in:
Sebastian Dröge 2008-07-07 09:55:41 +00:00
parent ba9c438f98
commit b02dc1bf6a
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2008-07-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* 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 <sebastian.droege@collabora.co.uk> 2008-07-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/playback/gstdecodebin.c: (add_raw_queue): * gst/playback/gstdecodebin.c: (add_raw_queue):

View file

@ -747,7 +747,7 @@ add_raw_queue (GstDecodeBin * decode_bin, GstPad * pad)
gst_object_unref (queuesrcpad); gst_object_unref (queuesrcpad);
gst_object_unref (queuesinkpad); gst_object_unref (queuesinkpad);
gst_bin_remove (GST_BIN (decode_bin), queue); 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); decode_bin->queues = g_list_append (decode_bin->queues, queue);