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:
René Stadler 2011-11-11 19:53:11 +01:00
parent 2886955d18
commit 8023733da8

View file

@ -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)) {