gst/playback/gstdecodebin2.c: When autoplugging fails, set the element back to NULL before unreffing it.

Original commit message from CVS:
* gst/playback/gstdecodebin2.c: (connect_pad):
When autoplugging fails, set the element back to NULL before
unreffing it.
This commit is contained in:
Wim Taymans 2008-05-06 10:16:49 +00:00
parent 9854bd07f6
commit 4a3db41f6d
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-05-06 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/playback/gstdecodebin2.c: (connect_pad):
When autoplugging fails, set the element back to NULL before
unreffing it.
2008-05-06 Sebastian Dröge <slomo@circular-chaos.org>
* win32/common/libgstaudio.def:

View file

@ -1150,6 +1150,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
if (!(sinkpad = find_sink_pad (element))) {
GST_WARNING_OBJECT (dbin, "Element %s doesn't have a sink pad",
GST_ELEMENT_NAME (element));
gst_element_set_state (element, GST_STATE_NULL);
gst_object_unref (element);
continue;
}
@ -1159,6 +1160,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
GST_WARNING_OBJECT (dbin, "Couldn't add %s to the bin",
GST_ELEMENT_NAME (element));
gst_object_unref (sinkpad);
gst_element_set_state (element, GST_STATE_NULL);
gst_object_unref (element);
continue;
}