v4l2: Handle corrupted buffer with empty payload
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Sun, 16 Nov 2014 17:34:17 +0000 (12:34 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Fri, 21 Nov 2014 16:29:19 +0000 (11:29 -0500)
commitb9992e43475265a4da2ae4aae0128fec12d9bfc2
tree5200e70b302d0442c84ef2c24251e7f62d26208e
parente6c2ad5571e5dedb212287efe238eb450032cd4f
v4l2: Handle corrupted buffer with empty payload

This allow skipping buffer flagged with ERROR that has no payload.
This is typical behaviour when a recovererable error occured during
capture in the driver, but that no valid data was ever written into that
buffer. This patch also translate V4L2_BUF_FLAG_ERROR into
GST_BUFFER_FLAG_CORRUPTED. Hence decoding error produce
by decoder due to missing frames will now be correctly marked. Finally,
this fixes a buffer leak when EOS is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=740040
sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2bufferpool.h
sys/v4l2/gstv4l2src.c
sys/v4l2/gstv4l2transform.c
sys/v4l2/gstv4l2videodec.c