summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-09-01 16:48:29 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-21 13:51:53 +0200
commitfeedc0754bd9fbdb1ae3453bc0555513e61d9e8d (patch)
tree1cfe0daa0739386051639af7d668c6488720138a /libavcodec/ac3dec.c
parent63e4c8a65316bb897f2c80cdac66b6f172c0f849 (diff)
ac3dec: actually use drc_scale private option
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 9c0ed7dccb..79360c2253 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;
}