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

pull/249/head
Carl Eugen Hoyos 8 years ago
parent 75bd4ea024
commit 9d5141d1fb
  1. 1
      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);

Loading…
Cancel
Save