From: Thiago Santos Date: Mon, 5 Apr 2010 17:51:58 +0000 (-0300) Subject: jpegenc: Fix getcaps function X-Git-Tag: RELEASE-0.10.22~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1984b72bb8e26add58c3211941f7388bb46a163;p=platform%2Fupstream%2Fgst-plugins-good.git jpegenc: Fix getcaps function When creating the caps allowed to upstream using downstream restrictions, use gst_pad_get_allowed_caps as that has the usable formats and puts into it the width, height and framerate fields. This avoids getting errors about getcaps returning non subset caps of its pad template. This error showed up on the metadata plugin unit test in -bad. --- diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index 08a7467..3ff46eb 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -321,7 +321,7 @@ gst_jpegenc_getcaps (GstPad * pad) /* we want to proxy properties like width, height and framerate from the other end of the element */ - caps = gst_pad_peer_get_caps (jpegenc->srcpad); + caps = gst_pad_get_allowed_caps (jpegenc->srcpad); if (caps == NULL) { caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));