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 24 additions, 4 deletionssys/v4l2/gstv4l2bufferpool.c
- sys/v4l2/gstv4l2bufferpool.h 10 additions, 0 deletionssys/v4l2/gstv4l2bufferpool.h
- sys/v4l2/gstv4l2src.c 18 additions, 8 deletionssys/v4l2/gstv4l2src.c
- sys/v4l2/gstv4l2transform.c 13 additions, 10 deletionssys/v4l2/gstv4l2transform.c
- sys/v4l2/gstv4l2videodec.c 20 additions, 18 deletionssys/v4l2/gstv4l2videodec.c