From 9eaf7bc47ddd6125757f0a3bf50ce3fe0842a149 Mon Sep 17 00:00:00 2001
From: Oliver Collyer <ovcollyer@mac.com>
Date: Wed, 31 Aug 2016 18:34:16 +0300
Subject: [PATCH] v4l2 - discard corrupted buffers
---
libavdevice/v4l2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index ddf331d..02dba37 100644
|
a
|
b
|
static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
|
| 520 | 520 | "Dequeued v4l2 buffer contains corrupted data (%d bytes).\n", |
| 521 | 521 | buf.bytesused); |
| 522 | 522 | buf.bytesused = 0; |
| | 523 | enqueue_buffer(s, &buf); |
| | 524 | av_packet_unref(pkt); |
| | 525 | return FFERROR_REDO; |
| 523 | 526 | } else |
| 524 | 527 | #endif |
| 525 | 528 | { |