From 551fe9c9b194cf5b8a36f7c43ec7f325a3d25c6f Mon Sep 17 00:00:00 2001 From: Ming Qian Date: Tue, 22 Aug 2023 09:57:14 +0800 Subject: [PATCH] v4l2object: clear format lists if source change event is received If decoder notify a source change event when the capture format is changed, not the resolution changed. then gst_v4l2_object_acquire_format will retuen false due to unsupported format. we need to clear the format lists in the source change flow, and reenumerate format list Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 65b6379..1d214b9 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -5575,6 +5575,9 @@ again: goto again; } + if (v4l2object->formats) + gst_v4l2_object_clear_format_list (v4l2object); + return GST_V4L2_FLOW_RESOLUTION_CHANGE; } -- 2.7.4