v4l2bufferpool: Check corruption flag on the right buffer

We where checking the buffer we are copying to instead of the buffer we
are copying from.

https://bugzilla.gnome.org/show_bug.cgi?id=740040
This commit is contained in:
Aleix Conchillo Flaqué 2015-02-25 16:45:11 -08:00 committed by Nicolas Dufresne
parent 7a1613b9e1
commit 63746c4131

View file

@ -1715,9 +1715,12 @@ gst_v4l2_buffer_pool_process (GstV4l2BufferPool * pool, GstBuffer ** buf)
/* An empty buffer on capture indicates the end of stream */
if (gst_buffer_get_size (tmp) == 0) {
gboolean corrupted = GST_BUFFER_FLAG_IS_SET (tmp,
GST_BUFFER_FLAG_CORRUPTED);
gst_v4l2_buffer_pool_release_buffer (bpool, tmp);
if (GST_BUFFER_FLAG_IS_SET (*buf, GST_BUFFER_FLAG_CORRUPTED))
if (corrupted)
goto buffer_corrupted;
else
goto eos;