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>
This commit is contained in:
Ming Qian 2023-08-22 09:57:14 +08:00 committed by Tim-Philipp Müller
parent 426bf399d4
commit 551fe9c9b1

View file

@ -5575,6 +5575,9 @@ again:
goto again;
}
if (v4l2object->formats)
gst_v4l2_object_clear_format_list (v4l2object);
return GST_V4L2_FLOW_RESOLUTION_CHANGE;
}