From: Sebastian Dröge Date: Fri, 26 Jun 2009 13:17:21 +0000 (+0200) Subject: basevideocodec: By default don't allow caps changes on the srcpad X-Git-Tag: 1.19.3~511^2~9496 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=939baee2bdc12994f5b13d27bce73ff98a4cb3d0;p=platform%2Fupstream%2Fgstreamer.git basevideocodec: By default don't allow caps changes on the srcpad This fixed playback of Dirac files with schrodec when upstream wants a different width/height, basevideocodec accepts this and then pushes buffers with new caps but content of the old caps. In the best case this will just result in wrong unit size and a failure in basestransform elements. --- diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c index 42349f0..9cddc3b 100644 --- a/gst-libs/gst/video/gstbasevideocodec.c +++ b/gst-libs/gst/video/gstbasevideocodec.c @@ -92,6 +92,7 @@ gst_base_video_codec_init (GstBaseVideoCodec * base_video_codec, g_return_if_fail (pad_template != NULL); base_video_codec->srcpad = gst_pad_new_from_template (pad_template, "src"); + gst_pad_use_fixed_caps (base_video_codec->srcpad); gst_element_add_pad (GST_ELEMENT (base_video_codec), base_video_codec->srcpad);