]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mace.c
alacdec: fix packed sample output with 5.1
[ffmpeg] / libavcodec / mace.c
index bf9ea08fcfddaf369780b9d23750fdd7fae1f038..dd721d24b5e62a4d9240faa49a8466d4580779b7 100644 (file)
@@ -231,7 +231,7 @@ static av_cold int mace_decode_init(AVCodecContext * avctx)
 {
     MACEContext *ctx = avctx->priv_data;
 
-    if (avctx->channels > 2)
+    if (avctx->channels > 2 || avctx->channels <= 0)
         return -1;
     avctx->sample_fmt = AV_SAMPLE_FMT_S16;