aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-10-22 13:40:10 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-11-01 11:29:13 -0400
commitbb6941af2afd057c3897afb78d034de2c355b8a0 (patch)
tree0356b139f424ac2dde4da62ce15adea324647b01 /libavcodec/pcm.c
parent6b07830a77729fe25c30026feabd53e8c4c5eb9e (diff)
downloadffmpeg-bb6941af2afd057c3897afb78d034de2c355b8a0.tar.gz
lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 1f8f22d172..832cb43851 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;
@@ -210,7 +208,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);
}
@@ -340,7 +338,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
break;
case AV_CODEC_ID_PCM_S16LE_PLANAR:
{
- const uint8_t *src2[MAX_CHANNELS];
+ const uint8_t *src2[FF_SANE_NB_CHANNELS];
n /= avctx->channels;
for (c = 0; c < avctx->channels; c++)
src2[c] = &src[c * n * 2];