jpegenc: sink pad's getcaps shouldn't use the src pad getcaps

Instead of using get_allowed_caps on the srcpad, the sinkpad getcaps
should use the getcaps of the srcpad's peer. This way the srcpad
can keep using fixed_caps and sinkpad getcaps exposes all caps
that can be negotiated

https://bugzilla.gnome.org/show_bug.cgi?id=637686
This commit is contained in:
Thiago Santos 2010-12-21 13:37:40 -03:00
parent f4155f3cf3
commit dcbba0932d

View file

@ -345,7 +345,7 @@ gst_jpegenc_getcaps (GstPad * pad)
/* we want to proxy properties like width, height and framerate from the
other end of the element */
othercaps = gst_pad_get_allowed_caps (jpegenc->srcpad);
othercaps = gst_pad_peer_get_caps_reffed (jpegenc->srcpad);
if (othercaps == NULL ||
gst_caps_is_empty (othercaps) || gst_caps_is_any (othercaps)) {
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));