From 403cffeace23cfc183e60cdc1e6cd83b89c7d465 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 26 Aug 2019 14:36:35 +0530 Subject: [PATCH] h265parse: fix colorimetry in src caps if sink caps has no structure We do want to include the colorimetry in the src caps if the sink caps doesn't have any structure associated. --- gst/videoparsers/gsth265parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 75c256799b..33dc1864b0 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -2184,7 +2184,7 @@ gst_h265_parse_update_src_caps (GstH265Parse * h265parse, GstCaps * caps) sps->bit_depth_luma_minus8 + 8, "bit-depth-chroma", G_TYPE_UINT, bit_depth_chroma, NULL); - if (colorimetry && s && !gst_structure_has_field (s, "colorimetry")) { + if (colorimetry && (!s || !gst_structure_has_field (s, "colorimetry"))) { gst_caps_set_simple (caps, "colorimetry", G_TYPE_STRING, colorimetry, NULL); }