Retrieving the pad template caps from a ghost pad returns ANY which when
merged with any other caps will return ANY. ANY is not very specific
and may cause suboptimal code paths in e.g. decoders that assume the
lowest common denominator when presented with ANY caps.
Fixes negotiating dma-buf with vaapidecodebin between glupload in the
video sink element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1144>
}
}
gst_caps_unref (target_caps);
- target_caps = tmp;
+ result = gst_caps_merge (result, tmp);
}
-
-
- result = gst_caps_merge (result, target_caps);
gst_object_unref (target);
}
}
if (target) {
GstCaps *target_caps = gst_pad_get_pad_template_caps (target);
GST_PLAY_BIN3_FILTER_CAPS (filter, target_caps);
- result = gst_caps_merge (result, target_caps);
+ if (!gst_caps_is_any (target_caps))
+ result = gst_caps_merge (result, target_caps);
gst_object_unref (target);
}
}