aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-08-10 10:21:10 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-08-11 11:33:32 -0400
commit9542ca9fb743d3fb595ec24c23f96037b15d6b53 (patch)
tree11f909e7030c40209e09833f4caa4559f006436f /libavcodec/ac3enc.c
parent4a71da0f3ab7f5542decd11c81994f849d5b2c78 (diff)
downloadffmpeg-9542ca9fb743d3fb595ec24c23f96037b15d6b53.tar.gz
ac3enc: fix 'channel_coupling' option to actually allow 'auto'.
Use 'auto' as the default value.
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 291a60d2da..af837c3256 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2211,8 +2211,12 @@ static av_cold void set_bandwidth(AC3EncodeContext *s)
cpl_start = s->options.cpl_start;
} else {
cpl_start = ac3_coupling_start_tab[s->channel_mode-2][s->bit_alloc.sr_code][s->frame_size_code/2];
- if (cpl_start < 0)
- s->cpl_enabled = 0;
+ if (cpl_start < 0) {
+ if (s->options.channel_coupling < 0)
+ s->cpl_enabled = 0;
+ else
+ cpl_start = 15;
+ }
}
}
if (s->cpl_enabled) {