mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
video-info: use default colorimetry on error
When we fail to parse the colorimetry property, fall back to the default colorimetry for the format and dimension instead of leaving things undefined.
This commit is contained in:
parent
fedc1dba1a
commit
cf572ae2cb
1 changed files with 4 additions and 3 deletions
|
@ -243,9 +243,10 @@ gst_video_info_from_caps (GstVideoInfo * info, const GstCaps * caps)
|
|||
else
|
||||
info->chroma_site = GST_VIDEO_CHROMA_SITE_UNKNOWN;
|
||||
|
||||
if ((s = gst_structure_get_string (structure, "colorimetry")))
|
||||
gst_video_colorimetry_from_string (&info->colorimetry, s);
|
||||
else
|
||||
if ((s = gst_structure_get_string (structure, "colorimetry"))) {
|
||||
if (!gst_video_colorimetry_from_string (&info->colorimetry, s))
|
||||
set_default_colorimetry (info);
|
||||
} else
|
||||
set_default_colorimetry (info);
|
||||
|
||||
if (gst_structure_get_fraction (structure, "pixel-aspect-ratio",
|
||||
|
|
Loading…
Reference in a new issue