]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcm.c
rtpenc_aac: Fix 10l bug
[ffmpeg] / libavcodec / pcm.c
index 7f4db373fbbf73493e0367e3ff4c312a963c2057..85a5fe6ed43a41fddea1ce07e6f0e99e6f2af9c9 100644 (file)
@@ -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;