From: Hou Qi Date: Tue, 24 May 2022 08:07:13 +0000 (+0800) Subject: v4l2: Reset transfer in gst_v4l2_object_acquire_format() X-Git-Tag: 1.22.0~1562 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f2fb3b783a064bc07603e5f28a3d18d5471045a;p=platform%2Fupstream%2Fgstreamer.git 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: --- diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index c0834a8..0c4ee90 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;