This came up in the case where v4l2 sets caps with colorimetry=NULL, and
then tries to parse back the colorimetry, causing a crash in
gst_video_get_colorimetry() because of g_str_equal(). We fix this by
making sure the only caller of the function never calls it with a null
colorimetry string.
const ColorimetryInfo *ci;
gboolean res = FALSE;
- if ((ci = gst_video_get_colorimetry (color))) {
+ if (!color) {
+ *cinfo = colorimetry[DEFAULT_UNKNOWN].color;
+ res = TRUE;
+ } else if ((ci = gst_video_get_colorimetry (color))) {
*cinfo = ci->color;
res = TRUE;
} else {