mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-16 20:36:06 +00:00
video: init chroma-size and colorimetry members even if missing from caps
This makes a TRUE return from gst_video_info_from_caps fully consistent with gst_video_info_init.
This commit is contained in:
parent
2886955d18
commit
8023733da8
1 changed files with 4 additions and 0 deletions
|
@ -854,9 +854,13 @@ gst_video_info_from_caps (GstVideoInfo * info, const GstCaps * caps)
|
|||
|
||||
if ((s = gst_structure_get_string (structure, "chroma-site")))
|
||||
info->chroma_site = gst_video_chroma_from_string (s);
|
||||
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
|
||||
memset (&info->colorimetry, 0, sizeof (GstVideoColorimetry));
|
||||
|
||||
if (gst_structure_get_fraction (structure, "pixel-aspect-ratio",
|
||||
&par_n, &par_d)) {
|
||||
|
|
Loading…
Reference in a new issue