#include "mathops.h"
#include "pcm_tablegen.h"
-#define MAX_CHANNELS 64
-
static av_cold int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 0;
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);
}
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;