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

Alexander Kojevnikov alexander
Mon Jul 26 14:59:11 CEST 2010


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.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mp3-accurate-bit-rate-for-vbr-streams.patch
Type: text/x-patch
Size: 3170 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100726/3026e361/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-mp3-use-unsigned-for-the-number-of-vbr-frames.patch
Type: text/x-patch
Size: 1427 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100726/3026e361/attachment-0001.bin>



More information about the ffmpeg-devel mailing list