X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpcm.c;h=85a5fe6ed43a41fddea1ce07e6f0e99e6f2af9c9;hb=78e08fd340e03b49f75e1ac31c20cc21434794bd;hp=7f4db373fbbf73493e0367e3ff4c312a963c2057;hpb=7bc6631dd0270941d38d44e6190a47509ef1c801;p=ffmpeg diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 7f4db373fbb..85a5fe6ed43 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -31,8 +31,6 @@ #include "mathops.h" #include "pcm_tablegen.h" -#define MAX_CHANNELS 64 - static av_cold int pcm_encode_init(AVCodecContext *avctx) { avctx->frame_size = 0; @@ -208,7 +206,7 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx) PCMDecode *s = avctx->priv_data; int i; - if (avctx->channels <= 0 || avctx->channels > MAX_CHANNELS) { + if (avctx->channels <= 0) { av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n"); return AVERROR(EINVAL); } @@ -345,7 +343,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, int i; n /= avctx->channels; for (c = 0; c < avctx->channels; c++) { - samples = s->frame.data[c]; + samples = s->frame.extended_data[c]; for (i = n; i > 0; i--) { AV_WN16A(samples, bytestream_get_le16(&src)); samples += 2;