mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-12-02 08:37:12 +00:00
Merge commit '9277050e2918e0a0df9689721a188a604d886616'
* commit '9277050e2918e0a0df9689721a188a604d886616':
vqf: Make sure sample_rate is set to a valid value
See: e481ba2ed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
554c22c710
@ -179,11 +179,11 @@ static int vqf_read_header(AVFormatContext *s)
|
|||||||
st->codec->sample_rate = 11025;
|
st->codec->sample_rate = 11025;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
st->codec->sample_rate = rate_flag*1000;
|
if (rate_flag < 8 || rate_flag > 44) {
|
||||||
if (st->codec->sample_rate <= 0) {
|
av_log(s, AV_LOG_ERROR, "Invalid rate flag %d\n", rate_flag);
|
||||||
av_log(s, AV_LOG_ERROR, "sample rate %d is invalid\n", st->codec->sample_rate);
|
return AVERROR_INVALIDDATA;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
st->codec->sample_rate = rate_flag*1000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user