From: Sebastian Dröge Date: Wed, 23 Nov 2011 12:42:56 +0000 (+0100) Subject: baseparse: Return template caps instead of other side's peer caps if get_sink_caps... X-Git-Tag: RELEASE-0.10.36~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa9ba2dd4e7167f00c48fee1fddbe5b02426ed5f;p=platform%2Fupstream%2Fgstreamer.git baseparse: Return template caps instead of other side's peer caps if get_sink_caps vfunc is not implemented Using gst_pad_proxy_get_caps() breaks backwards compatibility with old parsers because it will propagate the other side's fields like "parsed" and "framed" and also breaks parser/converters. Fixes bug #664221. --- diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index 1ccdc2c..308bb8a 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -3994,13 +3994,12 @@ gst_base_parse_sink_getcaps (GstPad * pad) if (klass->get_sink_caps) caps = klass->get_sink_caps (parse); else - caps = gst_pad_proxy_getcaps (pad); + caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); gst_object_unref (parse); GST_LOG_OBJECT (parse, "sink getcaps returning caps %" GST_PTR_FORMAT, caps); return caps; - } static void