v4l2bufferpool: Remove duplicate check
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 12 Jul 2018 19:11:39 +0000 (15:11 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 12 Jul 2018 19:17:44 +0000 (15:17 -0400)
commit38b68cbbd7a90fc3b77db301cda99e96aecc808d
treecb79c0563f3d1cde48a565bb8d9ff827ea96e4b5
parentac6e77acad79907564c96383f87d50bcf82d9e33
v4l2bufferpool: Remove duplicate check

We were calling gst_v4l2_is_buffer_valid() before and inside
gst_v4l2_buffer_pool_qbuf() as we needed to access the group. The second
check failed since the writability of the buffer get inherited from the
GstMemory, which lead to pipeline failure. As we cannot avoid the extra
ref, it would be racy otherwise, just pass the group to _dbuf() so it
does not have to call gst_v4l2_is_buffer_valid() again.

https://bugzilla.gnome.org/show_bug.cgi?id=796692
sys/v4l2/gstv4l2bufferpool.c