diff options
Diffstat (limited to 'sys/v4l2/gstv4l2object.c')
-rw-r--r-- | sys/v4l2/gstv4l2object.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 0658e7ca5..859925e6b 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -3424,10 +3424,13 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps, gst_v4l2_object_get_colorspace (&format, &info.colorimetry); s = gst_caps_get_structure (caps, 0); - if (gst_structure_has_field (s, "colorimetry") && - !gst_video_colorimetry_matches (&info.colorimetry, - gst_structure_get_string (s, "colorimetry"))) - goto invalid_colorimetry; + if (gst_structure_has_field (s, "colorimetry")) { + GstVideoColorimetry ci; + if (!gst_video_colorimetry_from_string (&ci, + gst_structure_get_string (s, "colorimetry")) + || !gst_video_colorimetry_is_equal (&ci, &info.colorimetry)) + goto invalid_colorimetry; + } /* In case we have skipped the try_fmt probes, we'll need to set the * colorimetry and interlace-mode back into the caps. */ |