Commit 9d5141d1 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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

parent 75bd4ea0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment