1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavd/v4l2: Avoid setting frame_size to a negative value.

This commit is contained in:
Carl Eugen Hoyos 2016-12-10 16:43:00 +01:00
parent 75bd4ea024
commit 9d5141d1fb

View File

@ -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);