Originally committed as revision 20195 to svn://svn.ffmpeg.org/ffmpeg/trunk
Daniel Verkamp authored on 2009/10/10 03:29:19... | ... |
@@ -77,6 +77,11 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) |
77 | 77 |
return AVERROR(ENOMEM); |
78 | 78 |
|
79 | 79 |
ast->codec->sample_rate = get_le16(pb); |
80 |
+ if (!ast->codec->sample_rate) { |
|
81 |
+ av_log(s, AV_LOG_ERROR, "invalid sample rate\n"); |
|
82 |
+ return -1; |
|
83 |
+ } |
|
84 |
+ |
|
80 | 85 |
tmv->audio_chunk_size = get_le16(pb); |
81 | 86 |
if (!tmv->audio_chunk_size) { |
82 | 87 |
av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n"); |