From 7f2fb3b783a064bc07603e5f28a3d18d5471045a Mon Sep 17 00:00:00 2001 From: Hou Qi Date: Tue, 24 May 2022 16:07:13 +0800 Subject: [PATCH] v4l2: Reset transfer in gst_v4l2_object_acquire_format() get_colorspace() checks input caps transfer when mapping V4L2_XFER_FUNC_709 back to V4L2_COLORSPACE_BT2020 and GST_VIDEO_TRANSFER_BT2020_12. After receiving source change event, decoder will G_FMT and S_FMT again. So need to reset transfer when acquiring format to avoid using the old transfer. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index c0834a87e6..0c4ee90d38 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -4225,6 +4225,7 @@ gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object, GstVideoInfo * info) gst_video_info_init (info); gst_video_alignment_reset (&align); + v4l2object->transfer = GST_VIDEO_TRANSFER_UNKNOWN; memset (&fmt, 0x00, sizeof (struct v4l2_format)); fmt.type = v4l2object->type;