summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-21 21:25:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-21 21:25:43 +0200
commit3e1a7ae44a97f20bbc9da0eba000663ef74e1890 (patch)
tree75bfd6ad30f1b24aa7d29c3a3081875c14b5dab5 /libavcodec/ac3dec.c
parent358d837dad4e2fbe010553990383d0ca4d5937cf (diff)
parent05fc9e40a4e4f808d457512420b887f458d216bc (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: swfdec: Add support for sample_rate_code 0 (5512 Hz) dct-test: factor out some common code and do whas was likely intended doc: library versions need to be bumped in version.h Revert "ffmpeg: get rid of useless AVInputStream.nb_streams." Remove some forgotten AVCodecContext.palctrl usage. lavc/utils: move avcodec_init() higher in the file. lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_* ac3dec: actually use drc_scale private option lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros alsa: add missing header msmpeg4: remove leftover unused debug variable declaration Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination. Fix av_dlog invocations with wrong or missing logging context. vf_yadif: add support to yuva420p vf_yadif: correct documentation on the parity parameter vf_yadif: copy buffer properties like aspect for second frame as well oma: support for encrypted files id3v2: add support for non-text and GEOB type tag frames des: add possibility to calculate DES-CBC-MAC with small buffer Conflicts: ffmpeg.c libavcodec/dct-test.c libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 503db5e201..9d1611f226 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -176,6 +176,11 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
AC3DecodeContext *s = avctx->priv_data;
s->avctx = avctx;
+#if FF_API_DRC_SCALE
+ if (avctx->drc_scale)
+ s->drc_scale = avctx->drc_scale;
+#endif
+
ff_ac3_common_init();
ac3_tables_init();
ff_mdct_init(&s->imdct_256, 8, 1, 1.0);
@@ -788,7 +793,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
do {
if(get_bits1(gbc)) {
s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)]-1.0) *
- s->avctx->drc_scale)+1.0;
+ s->drc_scale)+1.0;
} else if(blk == 0) {
s->dynamic_range[i] = 1.0f;
}