mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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>
This commit is contained in:
parent
e08c0803e1
commit
b884bcb93e
1 changed files with 8 additions and 0 deletions
|
@ -482,6 +482,7 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps)
|
||||||
gchar *colorimetry = NULL;
|
gchar *colorimetry = NULL;
|
||||||
const gchar *chroma_format = NULL;
|
const gchar *chroma_format = NULL;
|
||||||
const gchar *profile = NULL;
|
const gchar *profile = NULL;
|
||||||
|
gboolean codec_alpha_allowed = FALSE;
|
||||||
|
|
||||||
if (!self->update_caps)
|
if (!self->update_caps)
|
||||||
return;
|
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);
|
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) {
|
if (fps_n > 0 && fps_d > 0) {
|
||||||
gst_caps_set_simple (final_caps, "framerate",
|
gst_caps_set_simple (final_caps, "framerate",
|
||||||
GST_TYPE_FRACTION, fps_n, fps_d, NULL);
|
GST_TYPE_FRACTION, fps_n, fps_d, NULL);
|
||||||
|
@ -633,6 +638,9 @@ gst_vp9_parse_update_src_caps (GstVp9Parse * self, GstCaps * caps)
|
||||||
if (profile)
|
if (profile)
|
||||||
gst_caps_set_simple (final_caps, "profile", G_TYPE_STRING, profile, NULL);
|
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));
|
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))) {
|
if (!(src_caps && gst_caps_is_strictly_equal (src_caps, final_caps))) {
|
||||||
|
|
Loading…
Reference in a new issue