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

Mike Scheutzow mjs973 at optonline.net
Fri Jul 13 00:07:18 CEST 2012


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.

Mike Scheutzow






More information about the ffmpeg-devel mailing list