Message ID | 201612101649.08476.cehoyos@ag.or.at |
---|---|
State | Accepted |
Commit | 9d5141d1fb4c95600f9ca70a3db5475d1a78667b |
Headers | show |
2016-12-10 16:49 GMT+01:00 Carl Eugen Hoyos <cehoyos@ag.or.at>:
> Attached patch fixes a minor bug, displaying a negative bitrate.
Patch applied.
Carl Eugen
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);
Hi! Attached patch fixes a minor bug, displaying a negative bitrate. Please comment, Carl Eugen From e2e4999c9e91fb2f6bcc782fdfe7a2f5d73d7600 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <cehoyos@ag.or.at> Date: Sat, 10 Dec 2016 16:43:00 +0100 Subject: [PATCH] lavd/v4l2: Avoid setting frame_size to a negative value. --- libavdevice/v4l2.c | 1 + 1 file changed, 1 insertion(+)