[FFmpeg-cvslog] lavd/v4l2: Avoid setting frame_size to a negative value.
Carl Eugen Hoyos
git at videolan.org
Wed Jan 25 01:56:25 EET 2017
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Dec 10 16:43:00 2016 +0100| [9d5141d1fb4c95600f9ca70a3db5475d1a78667b] | committer: Carl Eugen Hoyos
lavd/v4l2: Avoid setting frame_size to a negative value.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d5141d1fb4c95600f9ca70a3db5475d1a78667b
---
libavdevice/v4l2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index ae51d83..b57909bd 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -936,6 +936,7 @@ static int v4l2_read_header(AVFormatContext *ctx)
goto fail;
st->codecpar->format = ff_fmt_v4l2ff(desired_format, codec_id);
+ if (st->codecpar->format != AV_PIX_FMT_NONE)
s->frame_size = av_image_get_buffer_size(st->codecpar->format,
s->width, s->height, 1);
More information about the ffmpeg-cvslog
mailing list