[FFmpeg-cvslog] r26121 - trunk/libavformat/mp3.c

michael subversion
Wed Dec 29 02:33:36 CET 2010


Author: michael
Date: Wed Dec 29 02:33:36 2010
New Revision: 26121

Log:
Fix assertion failure due to frames being 0 in mp3 vbr bitrate calculation.

Modified:
   trunk/libavformat/mp3.c

Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c	Wed Dec 29 00:55:56 2010	(r26120)
+++ trunk/libavformat/mp3.c	Wed Dec 29 02:33:36 2010	(r26121)
@@ -128,7 +128,7 @@ static int mp3_parse_vbr_tags(AVFormatCo
     if(frames)
         st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
                                     st->time_base);
-    if(size)
+    if(size && frames)
         st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
 
     return 0;



More information about the ffmpeg-cvslog mailing list