v4l2src: Fix crash in renegotiation
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 2 Dec 2022 17:15:34 +0000 (12:15 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 2 Dec 2022 19:25:52 +0000 (19:25 +0000)
commitc4cd94f465c0276e201d0fb8b1377ea56d6c2f33
tree21474e8ba9092c5eee1ad4f15cc223b2b2be5769
parent684e9b249998d8141fe0873db621f01809a875aa
v4l2src: Fix crash in renegotiation

This regression was introduce by fix for making buffer pool thread safe. When
we renegotiate, the pool will be setup after we set the format. But the code
has been simplified to only get the pool once before, which caused a null
pointer deref.

Fixes 94ba019 ("v4l2: Fix SIGSEGV on 'change state' during 'format change'")
Related to !3481
Fixes #1626

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3513>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2src.c