+2007-04-03 Wim Taymans <wim@fluendo.com>
+
+ Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
+
+ * gst/playback/gstdecodebin2.c: (connect_pad), (expose_pad),
+ (deactivate_free_recursive):
+ Decodebin2 doesn't unref pads it obtains in some occasions:
+ - multiqueue src pads, when either connecting further or exposing
+ - sink pads of new autoplugged elements
+ - peer pads when recursively freeing elements
+ Fixes #425455.
+
2007-03-30 Sebastian Dröge <slomo@circular-chaos.org>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
{
gboolean res = FALSE;
GList *tmp;
+ GstPad *mqpad = NULL;
g_return_val_if_fail (factories != NULL, FALSE);
GST_DEBUG_OBJECT (dbin, "pad %s:%s , group:%p",
/* 1. is element demuxer or parser */
if (is_demuxer_element (src)) {
- GstPad *mqpad;
-
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
if (!group)
gst_bin_remove (GST_BIN (dbin), element);
continue;
}
-
+ gst_object_unref (sinkpad);
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
/* link this element further */
GST_WARNING_OBJECT (dbin, "Couldn't set %s to PAUSED",
GST_ELEMENT_NAME (element));
gst_element_set_state (element, GST_STATE_NULL);
- gst_object_unref (sinkpad);
gst_bin_remove (GST_BIN (dbin), element);
continue;
}
break;
}
+ if (mqpad)
+ gst_object_unref (mqpad);
+
beach:
return res;
}
{
gboolean newgroup = FALSE;
gboolean isdemux;
+ GstPad *mqpad = NULL;
GST_DEBUG_OBJECT (dbin, "pad %s:%s, group:%p",
GST_DEBUG_PAD_NAME (pad), group);
isdemux = is_demuxer_element (src);
if (isdemux || newgroup) {
- GstPad *mqpad;
-
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
if (!(mqpad = gst_decode_group_control_demuxer_pad (group, pad)))
* group as being complete. */
gst_decode_group_set_complete (group);
}
+ if (mqpad)
+ gst_object_unref (mqpad);
+
beach:
return;
}
GstPad *peerpad = NULL;
if ((peerpad = gst_pad_get_peer (pad))) {
- GstObject *parent = gst_pad_get_parent (peerpad);
+ GstObject *parent;
+
+ parent = gst_pad_get_parent (peerpad);
+ gst_object_unref (peerpad);
if (parent && GST_IS_ELEMENT (parent))
deactivate_free_recursive (group, GST_ELEMENT (parent));