diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-17 11:45:49 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-11-01 11:29:14 -0400 |
commit | a38eadf7ed08293667c9f81780f7c081f278f19a (patch) | |
tree | 0849ffc6d6ae779a2cd3be2b444b78ea98bf37a9 /libavcodec | |
parent | 4f56f9c48f40db7f84819fc923b79ddaac678ae7 (diff) | |
download | ffmpeg-a38eadf7ed08293667c9f81780f7c081f278f19a.tar.gz |
atrac1: do not keep a copy of channel count in the private context
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/atrac1.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 7e78c7321c..b746a54e3b 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -80,7 +80,6 @@ typedef struct { DECLARE_ALIGNED(32, float, high)[512]; float* bands[3]; FFTContext mdct_ctx[3]; - int channels; DSPContext dsp; } AT1Ctx; @@ -280,7 +279,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data, GetBitContext gb; - if (buf_size < 212 * q->channels) { + if (buf_size < 212 * avctx->channels) { av_log(avctx, AV_LOG_ERROR, "Not enough data to decode!\n"); return AVERROR_INVALIDDATA; } @@ -292,7 +291,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data, return ret; } - for (ch = 0; ch < q->channels; ch++) { + for (ch = 0; ch < avctx->channels; ch++) { AT1SUCtx* su = &q->SUs[ch]; init_get_bits(&gb, &buf[212 * ch], 212 * 8); @@ -343,7 +342,6 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) avctx->channels); return AVERROR(EINVAL); } - q->channels = avctx->channels; /* Init the mdct transforms */ if ((ret = ff_mdct_init(&q->mdct_ctx[0], 6, 1, -1.0/ (1 << 15))) || |