vp9parse: Always default to super-frame
Sort the list of structure before truncating so that we don't prefer "frame"" alignment over "super-frame" in some cases. Fixes vp90-2-22-svc_1280x720_3.ivf conformance test when using libvpx based decoder. Fixes #4371 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8944>
This commit is contained in:
parent
a8f5618d1a
commit
d5d47d211e
@ -294,7 +294,6 @@ gst_vp9_parse_negotiate (GstVp9Parse * self, GstVp9ParseAlignment in_align,
|
||||
/* concentrate on leading structure, since decodebin parser
|
||||
* capsfilter always includes parser template caps */
|
||||
if (caps) {
|
||||
caps = gst_caps_make_writable (caps);
|
||||
while (gst_caps_get_size (caps) > 0) {
|
||||
GstStructure *s = gst_caps_get_structure (caps, 0);
|
||||
|
||||
@ -312,6 +311,18 @@ gst_vp9_parse_negotiate (GstVp9Parse * self, GstVp9ParseAlignment in_align,
|
||||
caps = gst_pad_get_allowed_caps (GST_BASE_PARSE_SRC_PAD (self));
|
||||
}
|
||||
|
||||
/* Sort super-frame alignment first before truncating */
|
||||
GstCaps *ordered_caps = gst_caps_new_full (gst_structure_new ("video/x-vp9",
|
||||
"alignment", G_TYPE_STRING, "super-frame", NULL),
|
||||
gst_structure_new ("video/x-vp9",
|
||||
"alignment", G_TYPE_STRING, "frame", NULL),
|
||||
NULL);
|
||||
GstCaps *tmp = caps;
|
||||
caps =
|
||||
gst_caps_intersect_full (ordered_caps, tmp, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (ordered_caps);
|
||||
gst_caps_unref (tmp);
|
||||
|
||||
caps = gst_caps_truncate (caps);
|
||||
GST_DEBUG_OBJECT (self, "negotiating with caps: %" GST_PTR_FORMAT, caps);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user