]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/atrac9dec.c
avcodec/v4l2: fix compile with older videodev2.h
[ffmpeg] / libavcodec / atrac9dec.c
index 4ea6ff0f315653ef93ee6834611ed65f7459eb7b..46e60ca998b56b60233af2f54dd891fff3910d4f 100644 (file)
@@ -839,6 +839,11 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)
 
     av_lfg_init(&s->lfg, 0xFBADF00D);
 
+    if (avctx->block_align <= 0) {
+        av_log(avctx, AV_LOG_ERROR, "Invalid block align\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (avctx->extradata_size != 12) {
         av_log(avctx, AV_LOG_ERROR, "Invalid extradata length!\n");
         return AVERROR_INVALIDDATA;