v4l2object: clear format lists if source change event is received
authorMing Qian <ming.qian@nxp.com>
Tue, 22 Aug 2023 01:57:14 +0000 (09:57 +0800)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 22 Aug 2023 22:59:10 +0000 (23:59 +0100)
commit551fe9c9b194cf5b8a36f7c43ec7f325a3d25c6f
treefe8bf7f9205c71954c1ed54ce7eb0f180420d5eb
parent426bf399d4dfa35b6482fd54912b33af2ce64228
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5223>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c