Commit 554c22c7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '9277050e'

* commit '9277050e':
  vqf: Make sure sample_rate is set to a valid value

See: e481ba2eMerged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4be0c6ed 9277050e
......@@ -179,11 +179,11 @@ static int vqf_read_header(AVFormatContext *s)
st->codec->sample_rate = 11025;
break;
default:
st->codec->sample_rate = rate_flag*1000;
if (st->codec->sample_rate <= 0) {
av_log(s, AV_LOG_ERROR, "sample rate %d is invalid\n", st->codec->sample_rate);
return -1;
if (rate_flag < 8 || rate_flag > 44) {
av_log(s, AV_LOG_ERROR, "Invalid rate flag %d\n", rate_flag);
return AVERROR_INVALIDDATA;
}
st->codec->sample_rate = rate_flag*1000;
break;
}
......
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