v4l2: fix the critical log when unreference the buffer with no data
authorElliot Chen <elliot.chen@nxp.com>
Fri, 8 Jul 2022 10:22:58 +0000 (18:22 +0800)
committerElliot Chen <elliot.chen@nxp.com>
Mon, 25 Jul 2022 08:44:05 +0000 (16:44 +0800)
commite0564b04c6cd08e62904903992b4de4cb50bb4b7
tree0aa384abc9b4353ad8daabd65186408e99fac991
parentcf94045dbfdc5d650a888abdecd754173b85a22b
v4l2: fix the critical log when unreference the buffer with no data

In the trick mode, driver may queue a valid buffer follow by an
empty buffer which has no valid data to indicate EOS.For the empty
buffer whose memory is multi-plane, need to resize it before
unreference it.

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