mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
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.
This commit is contained in:
parent
3c1940c187
commit
b1984b72bb
1 changed files with 1 additions and 1 deletions
|
@ -321,7 +321,7 @@ gst_jpegenc_getcaps (GstPad * pad)
|
||||||
/* we want to proxy properties like width, height and framerate from the
|
/* we want to proxy properties like width, height and framerate from the
|
||||||
other end of the element */
|
other end of the element */
|
||||||
|
|
||||||
caps = gst_pad_peer_get_caps (jpegenc->srcpad);
|
caps = gst_pad_get_allowed_caps (jpegenc->srcpad);
|
||||||
|
|
||||||
if (caps == NULL) {
|
if (caps == NULL) {
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||||
|
|
Loading…
Reference in a new issue