summaryrefslogtreecommitdiff
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 853f6a2aae..28d0e9b7e9 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -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) {