mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
jpegenc: should not return caps ANY based on downstream
When downstream has a sink pad with ANY caps, jpegenc should treat it the same as NULL and return its template caps. Fixes #614842
This commit is contained in:
parent
b62d781516
commit
74ac172bc2
1 changed files with 7 additions and 2 deletions
|
@ -322,10 +322,15 @@ gst_jpegenc_getcaps (GstPad * pad)
|
|||
other end of the element */
|
||||
|
||||
caps = gst_pad_peer_get_caps (jpegenc->srcpad);
|
||||
if (caps == NULL)
|
||||
|
||||
if (caps == NULL) {
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
else
|
||||
} else if (gst_caps_is_any (caps)) {
|
||||
gst_caps_unref (caps);
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
} else {
|
||||
caps = gst_caps_make_writable (caps);
|
||||
}
|
||||
|
||||
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
||||
structure = gst_caps_get_structure (caps, i);
|
||||
|
|
Loading…
Reference in a new issue