diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2021-05-07 16:30:49 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2021-05-11 16:06:56 -0400 |
commit | b884bcb93e291ebb80451457a21ba764e9a45d0d (patch) | |
tree | a6d8e502667625df3c8ce120da5393b5d58c32d3 /gst | |
parent | e08c0803e138c0f006b485cdf0e6196d834726b1 (diff) | |
download | gstreamer-plugins-bad-b884bcb93e291ebb80451457a21ba764e9a45d0d.tar.gz |
vp9parse: Manually fixate codec-alpha field
This is a newly introduced field, and we interpret it as false when missing in
the caps. Otherwise, a simple capsfilter will just add the missing field and
keep going, despite the upstream caps being a superset.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gstvp9parse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/videoparsers/gstvp9parse.c b/gst/videoparsers/gstvp9parse.c index 79ca9ffc5..d5e6f4a96 100644 --- a/gst/videoparsers/gstvp9parse.c +++ b/gst/videoparsers/gstvp9parse.c @@ -482,6 +482,7 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps) gchar *colorimetry = NULL; const gchar *chroma_format = NULL; const gchar *profile = NULL; + gboolean codec_alpha_allowed = FALSE; if (!self->update_caps) return; @@ -526,6 +527,10 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps) gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d); } + if (s && gst_structure_has_field (s, "codec-alpha")) { + gst_structure_get_boolean (s, "codec-alpha", &codec_alpha_allowed); + } + if (fps_n > 0 && fps_d > 0) { gst_caps_set_simple (final_caps, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL); @@ -633,6 +638,9 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps) if (profile) gst_caps_set_simple (final_caps, "profile", G_TYPE_STRING, profile, NULL); + gst_caps_set_simple (final_caps, "codec-alpha", G_TYPE_BOOLEAN, + codec_alpha_allowed, NULL); + src_caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (self)); if (!(src_caps && gst_caps_is_strictly_equal (src_caps, final_caps))) { |