[FFmpeg-cvslog] r26240 - trunk/libavformat/utils.c

cehoyos subversion
Thu Jan 6 04:30:20 CET 2011


Author: cehoyos
Date: Thu Jan  6 04:30:19 2011
New Revision: 26240

Log:
Fix assertion fail on audio files with invalid sample rates,
fixes issue 2475.

Patch by Daniel Kang, daniel.d.kang at gmail

Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Thu Jan  6 02:11:57 2011	(r26239)
+++ trunk/libavformat/utils.c	Thu Jan  6 04:30:19 2011	(r26240)
@@ -812,7 +812,7 @@ static void compute_frame_duration(int *
         break;
     case AVMEDIA_TYPE_AUDIO:
         frame_size = get_audio_frame_size(st->codec, pkt->size);
-        if (frame_size < 0)
+        if (frame_size <= 0 || st->codec->sample_rate <= 0)
             break;
         *pnum = frame_size;
         *pden = st->codec->sample_rate;



More information about the ffmpeg-cvslog mailing list