[FFmpeg-devel] [PATCH] mp3: accurate bit rate for vbr streams

Michael Niedermayer michaelni
Mon Jul 26 17:07:19 CEST 2010


On Mon, Jul 26, 2010 at 10:59:11PM +1000, Alexander Kojevnikov wrote:
> On 26 July 2010 21:21, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Jul 25, 2010 at 07:12:41PM +1000, Alexander Kojevnikov wrote:
> >> diff --git a/libavformat/mp3.c b/libavformat/mp3.c
> >> index 11ce59c..ba70f3e 100644
> >> --- a/libavformat/mp3.c
> >> +++ b/libavformat/mp3.c
> >> @@ -84,6 +84,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
> >> ?{
> >> ? ? ?uint32_t v, spf;
> >> ? ? ?int frames = -1; /* Total number of frames in file */
> >> + ? ?int size = -1; /* Total number of bytes in the stream */
> >
> > that should maybe be unsigned, otherwise it would be limited to 2gb
> 
> Fixed. I also changed `frames` to be unsigned (in a separate patch.)

>  libavcodec/mpegaudiodec.c |    6 ++++--
>  libavformat/mp3.c         |   18 +++++++++++++-----
>  2 files changed, 17 insertions(+), 7 deletions(-)
> 15527d5812f126d6200fc446bab65a7cb6340405  0001-mp3-accurate-bit-rate-for-vbr-streams.patch
> From c8e84a1ce6237bc6d9ca416338bdbb351b1117b9 Mon Sep 17 00:00:00 2001
> From: Alexander Kojevnikov <alexander at kojevnikov.com>
> Date: Mon, 26 Jul 2010 22:50:20 +1000
> Subject: [PATCH 1/2] mp3: accurate bit rate for vbr streams

ok if tested

[...]

>  mp3.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> b53603ccc590a71c7081901c240ee186b37ee95c  0002-mp3-use-unsigned-for-the-number-of-vbr-frames.patch
> From ad58028aeb50ffe3a9fa30982d511219e802c710 Mon Sep 17 00:00:00 2001
> From: Alexander Kojevnikov <alexander at kojevnikov.com>
> Date: Mon, 26 Jul 2010 22:53:53 +1000
> Subject: [PATCH 2/2] mp3: use unsigned for the number of vbr frames

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100726/2a0f7faa/attachment.pgp>



More information about the ffmpeg-devel mailing list