gst/playback/gstdecodebin2.c: Decodebin2 doesn't unref pads it obtains in some occasions:
Original commit message from CVS: 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.
This commit is contained in:
parent
fac74a841b
commit
8676f3dce7
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
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>
|
2007-03-30 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
||||||
|
@ -835,6 +835,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
{
|
{
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
GstPad *mqpad = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (factories != NULL, FALSE);
|
g_return_val_if_fail (factories != NULL, FALSE);
|
||||||
GST_DEBUG_OBJECT (dbin, "pad %s:%s , group:%p",
|
GST_DEBUG_OBJECT (dbin, "pad %s:%s , group:%p",
|
||||||
@ -842,8 +843,6 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
|
|
||||||
/* 1. is element demuxer or parser */
|
/* 1. is element demuxer or parser */
|
||||||
if (is_demuxer_element (src)) {
|
if (is_demuxer_element (src)) {
|
||||||
GstPad *mqpad;
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
|
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
|
||||||
|
|
||||||
if (!group)
|
if (!group)
|
||||||
@ -908,7 +907,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
gst_bin_remove (GST_BIN (dbin), element);
|
gst_bin_remove (GST_BIN (dbin), element);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
gst_object_unref (sinkpad);
|
||||||
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
/* link this element further */
|
/* link this element further */
|
||||||
@ -920,7 +919,6 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
GST_WARNING_OBJECT (dbin, "Couldn't set %s to PAUSED",
|
GST_WARNING_OBJECT (dbin, "Couldn't set %s to PAUSED",
|
||||||
GST_ELEMENT_NAME (element));
|
GST_ELEMENT_NAME (element));
|
||||||
gst_element_set_state (element, GST_STATE_NULL);
|
gst_element_set_state (element, GST_STATE_NULL);
|
||||||
gst_object_unref (sinkpad);
|
|
||||||
gst_bin_remove (GST_BIN (dbin), element);
|
gst_bin_remove (GST_BIN (dbin), element);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -929,6 +927,9 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mqpad)
|
||||||
|
gst_object_unref (mqpad);
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -1058,6 +1059,7 @@ expose_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
{
|
{
|
||||||
gboolean newgroup = FALSE;
|
gboolean newgroup = FALSE;
|
||||||
gboolean isdemux;
|
gboolean isdemux;
|
||||||
|
GstPad *mqpad = NULL;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (dbin, "pad %s:%s, group:%p",
|
GST_DEBUG_OBJECT (dbin, "pad %s:%s, group:%p",
|
||||||
GST_DEBUG_PAD_NAME (pad), group);
|
GST_DEBUG_PAD_NAME (pad), group);
|
||||||
@ -1074,8 +1076,6 @@ expose_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
isdemux = is_demuxer_element (src);
|
isdemux = is_demuxer_element (src);
|
||||||
|
|
||||||
if (isdemux || newgroup) {
|
if (isdemux || newgroup) {
|
||||||
GstPad *mqpad;
|
|
||||||
|
|
||||||
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
|
GST_LOG_OBJECT (src, "is a demuxer, connecting the pad through multiqueue");
|
||||||
|
|
||||||
if (!(mqpad = gst_decode_group_control_demuxer_pad (group, pad)))
|
if (!(mqpad = gst_decode_group_control_demuxer_pad (group, pad)))
|
||||||
@ -1091,6 +1091,9 @@ expose_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad,
|
|||||||
* group as being complete. */
|
* group as being complete. */
|
||||||
gst_decode_group_set_complete (group);
|
gst_decode_group_set_complete (group);
|
||||||
}
|
}
|
||||||
|
if (mqpad)
|
||||||
|
gst_object_unref (mqpad);
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1823,7 +1826,10 @@ restart:
|
|||||||
GstPad *peerpad = NULL;
|
GstPad *peerpad = NULL;
|
||||||
|
|
||||||
if ((peerpad = gst_pad_get_peer (pad))) {
|
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))
|
if (parent && GST_IS_ELEMENT (parent))
|
||||||
deactivate_free_recursive (group, GST_ELEMENT (parent));
|
deactivate_free_recursive (group, GST_ELEMENT (parent));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user