mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
tta: error out if samplerate is zero.
Prevents a division by zero later on. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
parent
6ab681a4c1
commit
7416d61036
@ -223,6 +223,9 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
|
||||
if (s->channels == 0) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
} else if (avctx->sample_rate == 0) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Invalid samplerate\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
switch(s->bps) {
|
||||
|
Loading…
Reference in New Issue
Block a user