mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
pbutils: Fix vp9 mime mapping when caps when no chroma-site.
It's possible to have 4:2:0 chroma format without chroma-site in caps, but it isn't validated by the current code. This patch fixes it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3405>
This commit is contained in:
parent
202dc49f8b
commit
f74fb5142d
1 changed files with 4 additions and 1 deletions
|
@ -2520,7 +2520,10 @@ vp9_caps_get_mime_codec (GstCaps * caps)
|
||||||
GstVideoChromaSite chroma_site;
|
GstVideoChromaSite chroma_site;
|
||||||
|
|
||||||
chroma_site_str = gst_structure_get_string (caps_st, "chroma-site");
|
chroma_site_str = gst_structure_get_string (caps_st, "chroma-site");
|
||||||
chroma_site = gst_video_chroma_site_from_string (chroma_site_str);
|
if (chroma_site_str)
|
||||||
|
chroma_site = gst_video_chroma_site_from_string (chroma_site_str);
|
||||||
|
else
|
||||||
|
chroma_site = GST_VIDEO_CHROMA_SITE_UNKNOWN;
|
||||||
if (chroma_site == GST_VIDEO_CHROMA_SITE_V_COSITED) {
|
if (chroma_site == GST_VIDEO_CHROMA_SITE_V_COSITED) {
|
||||||
chroma_format = 0;
|
chroma_format = 0;
|
||||||
} else if (chroma_site == GST_VIDEO_CHROMA_SITE_COSITED) {
|
} else if (chroma_site == GST_VIDEO_CHROMA_SITE_COSITED) {
|
||||||
|
|
Loading…
Reference in a new issue