diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 6c6f50ae2f..413077f2c3 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -2056,7 +2056,7 @@ gst_h264_parse_update_src_caps (GstH264Parse * h264parse, GstCaps * caps) "bit-depth-luma", G_TYPE_UINT, 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); }