[FFmpeg-devel] [PATCH 2/2] Wrong bit rate in MPEG2 video file (Ticket #1862)

Heesuk Jung heesuk.jung at lge.com
Tue Oct 30 00:47:21 CET 2012


Hi,

As you feedback for this patch, I will change simpler condition.
I'm sorry for confusion title name and this patch is only 1 patch(it does
not exist patch 1.2)

Thanks !

-----Original Message-----
From: ffmpeg-devel-bounces at ffmpeg.org
[mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos
Sent: Monday, October 29, 2012 7:32 PM
To: ffmpeg-devel at ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Wrong bit rate in MPEG2 video file
(Ticket #1862)

Heesuk Jung <heesuk.jung <at> lge.com> writes:

> -                avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) |
> (buf[6]>>6))*400;
> 
> +                if (((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6)) ==
0x3FFFF)
> {
> 
> +                    avctx->bit_rate = 0;
> 
> +                } else {
> 
> +                    avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) |
> (buf[6]>>6))*400;
> 
> +                }

The patch is unfortunately broken, your mailer ate it.

Wouldn't just adding two lines look simpler?

     avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;
+    if (avctx->bit_rate = 0x3FFFF)
+            avctx->bit_rate = 0;
     avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;

Carl Eugen

PS: Is there also a [PATCH 1/2] ?

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list