[FFmpeg-devel] [PATCH] Fix timestamp calculation when demuxing MP3 frames in a .avi container.

Michael Niedermayer michaelni at gmx.at
Fri Jul 13 04:33:27 CEST 2012

On Thu, Jul 12, 2012 at 06:07:18PM -0400, Mike Scheutzow wrote:
> On 7/11/2012 9:34 PM, Michael Niedermayer wrote:
> >>+                        if (fps > 41) {
> >>+                            // highest valid frame per sec is 48000/1152
> >>+                            av_log(s, AV_LOG_WARNING, "st%d: MP3 frame rate is invalid (%d FPS)\n", st->id, fps);
> >>+                        } else {
> >did this if() make any difference in any of your tests ?
> >iam asking because it looks kind of ugly not saying iam against it if
> >it is needed
> Results from web search indicate that some (broken) software tools
> create avi files with the audio sample rate in stream's header
> information, rather than the audio frame rate that we need. This is
> a check for that problem. It will also help to notify the user why
> the avi file is not playing back properly.
> I did not bother to actually find such a sample file. The check
> serves a worthwhile purpose.

someone might have encoded 96khz in mp3 (claiming it to be 48khz)
or someone wight wanted to speedup a files a little to 49khz, the check
can cause problems for these cases.
Its not a big thing as it breaks nothing that works currently but
it doesnt feel right as it is somehow ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120713/b244e4f8/attachment.asc>

More information about the ffmpeg-devel mailing list