]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/apedec.c
ac3: detect dba errors and prevent writing past end of array
[ffmpeg] / libavcodec / apedec.c
index 82d567f4cfcf560403f6ff2d312888c448f32084..8746724133ab766f7acd779a557c74015ffa4e00 100644 (file)
@@ -199,6 +199,7 @@ static av_cold int ape_decode_init(AVCodecContext * avctx)
 
     dsputil_init(&s->dsp, avctx);
     avctx->sample_fmt = SAMPLE_FMT_S16;
+    avctx->channel_layout = (avctx->channels==2) ? CH_LAYOUT_STEREO : CH_LAYOUT_MONO;
     return 0;
 }