mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-18 13:21:08 +00:00
lavd/v4l2: Avoid setting frame_size to a negative value.
This commit is contained in:
parent
75bd4ea024
commit
9d5141d1fb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user