[FFmpeg-cvslog] r20195 - trunk/libavformat/tmv.c

daniel subversion
Fri Oct 9 20:29:19 CEST 2009


Author: daniel
Date: Fri Oct  9 20:29:19 2009
New Revision: 20195

Log:
Do not allow 0 sample rate in TMV demuxer

Modified:
   trunk/libavformat/tmv.c

Modified: trunk/libavformat/tmv.c
==============================================================================
--- trunk/libavformat/tmv.c	Fri Oct  9 20:24:47 2009	(r20194)
+++ trunk/libavformat/tmv.c	Fri Oct  9 20:29:19 2009	(r20195)
@@ -77,6 +77,11 @@ static int tmv_read_header(AVFormatConte
         return AVERROR(ENOMEM);
 
     ast->codec->sample_rate = get_le16(pb);
+    if (!ast->codec->sample_rate) {
+        av_log(s, AV_LOG_ERROR, "invalid sample rate\n");
+        return -1;
+    }
+
     tmv->audio_chunk_size   = get_le16(pb);
     if (!tmv->audio_chunk_size) {
         av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");



More information about the ffmpeg-cvslog mailing list