From: Edward Hervey Date: Tue, 15 Jun 2010 09:48:17 +0000 (+0200) Subject: Revert "gstpad: Return pad template in get_caps if pad is not negotiable" X-Git-Tag: RELEASE-0.10.30~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3df54c45bff7f206dbf833b5c4e4aaaaac0b2f9a;p=platform%2Fupstream%2Fgstreamer.git Revert "gstpad: Return pad template in get_caps if pad is not negotiable" This reverts commit 7460321a600438966d7152ab2b4318be48eadce0. crack --- diff --git a/gst/gstpad.c b/gst/gstpad.c index e376857..5cd434f 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2181,14 +2181,6 @@ gst_pad_get_caps_unlocked (GstPad * pad) GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "get pad caps"); - /* If the parent element is in GST_STATE_NULL, return the template caps */ - if (G_UNLIKELY (!GST_PAD_IS_NEGOTIABLE (pad) && GST_PAD_PAD_TEMPLATE (pad))) { - GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, - "parent element is in GST_STATE_NULL, using pad templates"); - result = gst_caps_ref (GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (pad))); - goto done; - } - if (GST_PAD_GETCAPSFUNC (pad)) { GST_CAT_DEBUG_OBJECT (GST_CAT_CAPS, pad, "dispatching to pad getcaps function"); diff --git a/tests/check/gst/gstghostpad.c b/tests/check/gst/gstghostpad.c index a752550..b78538a 100644 --- a/tests/check/gst/gstghostpad.c +++ b/tests/check/gst/gstghostpad.c @@ -591,9 +591,6 @@ GST_START_TEST (test_ghost_pads_new_from_template) /* check template is properly set */ fail_unless (GST_PAD_PAD_TEMPLATE (ghostpad) == ghosttempl); - /* Set pad negotiable so the getcaps call goes through */ - gst_pad_set_negotiable (ghostpad, TRUE); - /* check ghostpad caps are from the sinkpad */ newcaps = gst_pad_get_caps (ghostpad); fail_unless (newcaps != NULL); @@ -648,9 +645,6 @@ GST_START_TEST (test_ghost_pads_new_no_target_from_template) fail_unless (gst_ghost_pad_set_target ((GstGhostPad *) ghostpad, sinkpad)); - /* set pad negotiable so the getcaps call goes through */ - gst_pad_set_negotiable (ghostpad, TRUE); - /* check ghostpad caps are now from the target pad */ newcaps = gst_pad_get_caps (ghostpad); fail_unless (newcaps != NULL);