diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-09 00:27:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-09 00:27:00 +0200 |
commit | d1d8ee5e9191dd3ba63532ea219cb916b4d64121 (patch) | |
tree | cc9d5914812153d91ac595f27f0e396b5e892e1f /libavdevice | |
parent | 28f20d2ff487aa589643d8f70eaf614b78839685 (diff) | |
download | ffmpeg-streaming-d1d8ee5e9191dd3ba63532ea219cb916b4d64121.zip ffmpeg-streaming-d1d8ee5e9191dd3ba63532ea219cb916b4d64121.tar.gz |
avdevice/v4l2: Try to fix build on netbsd/openbsd
Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/v4l2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 76f7c4e..1c2ce59 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -521,12 +521,15 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt) // always keep at least one buffer queued av_assert0(avpriv_atomic_int_get(&s->buffers_queued) >= 1); +#ifdef V4L2_BUF_FLAG_ERROR if (buf.flags & V4L2_BUF_FLAG_ERROR) { av_log(ctx, AV_LOG_WARNING, "Dequeued v4l2 buffer contains corrupted data (%d bytes).\n", buf.bytesused); buf.bytesused = 0; - } else { + } else +#endif + { /* CPIA is a compressed format and we don't know the exact number of bytes * used by a frame, so set it here as the driver announces it. */ if (ctx->video_codec_id == AV_CODEC_ID_CPIA) |