gst/gstghostpad.c: GhostPad no longer implicitely use the padtemplates of the targets.

Original commit message from CVS:
* gst/gstghostpad.c: (gst_proxy_pad_set_target_unlocked):
GhostPad no longer implicitely use the padtemplates of the targets.
Fixes #347384
This commit is contained in:
Edward Hervey 2006-07-13 10:47:00 +00:00
parent d0fe686c02
commit 2f9ca83c94
2 changed files with 10 additions and 16 deletions

View file

@ -1,3 +1,9 @@
2006-07-13 Edward Hervey <edward@fluendo.com>
* gst/gstghostpad.c: (gst_proxy_pad_set_target_unlocked):
GhostPad no longer implicitely use the padtemplates of the targets.
Fixes #347384
2006-07-11 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gstvalue.c: (gst_value_compare_list),

View file

@ -290,7 +290,6 @@ static gboolean
gst_proxy_pad_set_target_unlocked (GstPad * pad, GstPad * target)
{
GstPad *oldtarget;
GstPadTemplate **template_p;
if (target) {
GST_LOG_OBJECT (pad, "setting target %s:%s", GST_DEBUG_PAD_NAME (target));
@ -304,25 +303,14 @@ gst_proxy_pad_set_target_unlocked (GstPad * pad, GstPad * target)
/* clear old target */
if ((oldtarget = GST_PROXY_PAD_TARGET (pad))) {
/* Clear previous pad template */
template_p = &GST_PAD_PAD_TEMPLATE (pad);
gst_object_replace ((GstObject **) template_p, NULL);
/* Get rid of target */
GST_PROXY_PAD_TARGET (pad) = NULL;
gst_object_unref (oldtarget);
}
if (target) {
/* set and ref new target if any */
if (target)
GST_PROXY_PAD_TARGET (pad) = gst_object_ref (target);
/* Set new pad template */
template_p = &GST_PAD_PAD_TEMPLATE (pad);
gst_object_replace ((GstObject **) template_p,
(GstObject *) GST_PAD_PAD_TEMPLATE (target));
}
return TRUE;
}
@ -873,8 +861,8 @@ beach:
* @name: the name of the new pad, or NULL to assign a default name.
* @target: the pad to ghost.
*
* Create a new ghostpad with @target as the target. The direction and
* padtemplate will be taken from the target pad.
* Create a new ghostpad with @target as the target. The direction will be taken
* from the target pad.
*
* Will ref the target.
*