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/5218>
This commit is contained in:
Ming Qian 2023-08-22 09:57:14 +08:00 committed by GStreamer Marge Bot
parent c4b30174a3
commit fd720fbf64

View file

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