diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-18 22:53:13 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-22 10:10:08 -0400 |
commit | c51311b907e0397866748d6af14b160d96c4673b (patch) | |
tree | 9c7a3d151b2bad6ad1ad1ce21215234bfb6f50e8 /libavcodec/atrac3.c | |
parent | 7e76f270819e5c5a11372bc0e6368b542586506c (diff) | |
download | ffmpeg-c51311b907e0397866748d6af14b160d96c4673b.tar.gz |
atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r-- | libavcodec/atrac3.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 474fa76a8f..21403d293c 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -109,7 +109,6 @@ typedef struct ATRAC3Context { //@{ /** extradata */ int scrambled_stream; - int frame_factor; //@} FFTContext mdct_ctx; @@ -847,7 +846,7 @@ static int atrac3_decode_frame(AVCodecContext *avctx, void *data, static av_cold int atrac3_decode_init(AVCodecContext *avctx) { int i, ret; - int version, delay, samples_per_frame; + int version, delay, samples_per_frame, frame_factor; const uint8_t *edata_ptr = avctx->extradata; ATRAC3Context *q = avctx->priv_data; static VLC_TYPE atrac3_vlc_table[4096][2]; @@ -870,7 +869,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) q->coding_mode = bytestream_get_le16(&edata_ptr); av_log(avctx, AV_LOG_DEBUG,"[8-9] %d\n", bytestream_get_le16(&edata_ptr)); //Dupe of coding mode - q->frame_factor = bytestream_get_le16(&edata_ptr); // Unknown always 1 + frame_factor = bytestream_get_le16(&edata_ptr); // Unknown always 1 av_log(avctx, AV_LOG_DEBUG,"[12-13] %d\n", bytestream_get_le16(&edata_ptr)); // Unknown always 0 @@ -881,12 +880,12 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) q->coding_mode = q->coding_mode ? JOINT_STEREO : STEREO; q->scrambled_stream = 0; - if (avctx->block_align != 96 * avctx->channels * q->frame_factor && - avctx->block_align != 152 * avctx->channels * q->frame_factor && - avctx->block_align != 192 * avctx->channels * q->frame_factor) { + if (avctx->block_align != 96 * avctx->channels * frame_factor && + avctx->block_align != 152 * avctx->channels * frame_factor && + avctx->block_align != 192 * avctx->channels * frame_factor) { av_log(avctx, AV_LOG_ERROR, "Unknown frame/channel/frame_factor " "configuration %d/%d/%d\n", avctx->block_align, - avctx->channels, q->frame_factor); + avctx->channels, frame_factor); return AVERROR_INVALIDDATA; } } else if (avctx->extradata_size == 10) { |