1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Do not allow 0 sample rate in TMV demuxer

Originally committed as revision 20195 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Daniel Verkamp 2009-10-09 18:29:19 +00:00
parent f19ae9ea4d
commit 54eb4ae0a2

View File

@ -77,6 +77,11 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
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");