From 0acbf40060cdeec9efda623d84fbba672f8d5dc6 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 25 Feb 2019 19:08:08 +1100 Subject: [PATCH] v4l2dec: also remove the colorimetry and chroma-site fields If a different format is chosen, then these values are incorrect. --- sys/v4l2/gstv4l2videodec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c index 7f87138..9dc7a1b 100644 --- a/sys/v4l2/gstv4l2videodec.c +++ b/sys/v4l2/gstv4l2videodec.c @@ -638,7 +638,8 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder, acquired_caps = gst_video_info_to_caps (&info); GST_DEBUG_OBJECT (self, "Acquired caps: %" GST_PTR_FORMAT, acquired_caps); st = gst_caps_get_structure (acquired_caps, 0); - gst_structure_remove_field (st, "format"); + gst_structure_remove_fields (st, "format", "colorimetry", "chroma-site", + NULL); /* Probe currently available pixel formats */ available_caps = gst_caps_copy (self->probed_srccaps); -- 2.7.4