Commit edbf0656 authored by daniel's avatar daniel

Do not allow 0 sample rate in TMV demuxer



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20195 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9d01ce26
...@@ -77,6 +77,11 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -77,6 +77,11 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ast->codec->sample_rate = get_le16(pb); 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); tmv->audio_chunk_size = get_le16(pb);
if (!tmv->audio_chunk_size) { if (!tmv->audio_chunk_size) {
av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n"); av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment