From 8023733da8ed2973e5ab38ddb6556c30363c7c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Stadler?= Date: Fri, 11 Nov 2011 19:53:11 +0100 Subject: [PATCH] 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. --- gst-libs/gst/video/video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c index 1ec4d533ca..8ce97cc570 100644 --- a/gst-libs/gst/video/video.c +++ b/gst-libs/gst/video/video.c @@ -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)) {