[FFmpeg-devel] [PATCH] Lost VBR header
michaelni at gmx.at
Sat May 7 04:08:05 CEST 2011
On Fri, May 06, 2011 at 08:53:19PM +0200, Peter Belkner wrote:
> On 29.04.2011 21:08, Peter Belkner wrote:
>> On 28.04.2011 21:43, Michael Niedermayer wrote:
>>> This patch results in differnt output when the resulting mp3 is decoded
>>> also there are error messages and 3456 samples (6*576) missing at the
>> Unfortunately I'm not able to exactly reproduce this error. In some
>> cases I found some frame headers corrupted.
>> I changed the following:
>> * Dynamic bitrate index determination to really make sure that the
>> TOC fits into the XING frame.
>> * In mp3_write_trailer() changed the order of writing ID3v1 and
>> fixing the XING header. (Fixing the XING header is now the final
>> operation. This makes the corrupted frame error vanishing in my
>> tests. Is there someting I'm missing with AVIO?)
>> In order to avoid overflow in TOC statistics (wrapping to negative
>> * Diveded the bitrate by 1000.
>> * Changed the statistics data types from "int" to "uint64_t".
>> Please find a revised patch below.
>> With the new patch I could not find any difference the following way:
>> unpatched/ffmpeg -i a.mp3 -acodec copy -y b.mp3
>> unpatched/ffmpeg -i b.mp3 -y b.wav
>> patched/ffmpeg -i a.mp3 -acodec copy -y c.mp3
>> patched/ffmpeg -i c.mp3 -y c.wav
>> diff --binary b.wav c.wav
>> Could you please share the test case (MP3) in case the error is not
>> vanishing in your environment?
> Is there any chance to get this into FFmpeg?
> Please let me know how I can contribute.
> Thank you for your effort.
Sorry for the delay, i had some changes on top of your last patch
that i needed to rebase to the new, test, check, update ...
All should be commited now, thanks for the patch
and please review my changes that i did on top of your code (more eyes
reveiwing cant hurt)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel