Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-02 16:39:53 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-11-02 16:43:57 +0400
commitdb9f426caba574719c58de12e68742063c8e7979 (patch)
tree4d61a4a10f3b96e3bbc20a01f3d597d68b4181e5 /libavcodec/atrac1.c
parenta5f6720f13c7678c61be1413debf3e11e678781c (diff)
parent8ac0f6767bf63d3e6b308ee6648ff02598b81e03 (diff)
Merge commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03'
* commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03': dcadec: allow the decoder to change the channel layout mid-stream cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR cook: move samples_per_frame from COOKSubpacket to where it is used cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels() cook: reverse a condition so that the code makes more sense cook: remove unneeded COOKContext variable, sample_rate cook: remove unneeded COOKContext variable, bit_rate cook: use AVCodecContext.channels instead of keeping a private copy bmvaudio: set channel layout at init() rather than validating it atrac1: do not keep a copy of channel count in the private context dsicinaudio: set channels and channel layout g722dec: set channel layout at initialization instead of validating it amrwbdec: set channels, channel_layout, and sample_rate amrnbdec: set channels, channel_layout, and sample_rate dca_parser: allow the parser to change the sample rate lavc: check channel count after decoder init lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders Conflicts: libavcodec/dcadec.c libavcodec/pcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/atrac1.c')
-rw-r--r--libavcodec/atrac1.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index 86d371e8c8..26f5cb1739 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))) ||