aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-19 21:46:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-19 21:46:32 +0100
commit10f1ee2f923a700879687bc844b9deca7e750846 (patch)
treea7ebf34723f904c996b486e350d5729410a16c09 /libavcodec/ac3dec.c
parent3a5a039adee3ee928898df82e20c40212d618195 (diff)
parentade75fb811500f3e3f284737f123938d83be728f (diff)
downloadffmpeg-10f1ee2f923a700879687bc844b9deca7e750846.tar.gz
Merge commit 'ade75fb811500f3e3f284737f123938d83be728f'
* commit 'ade75fb811500f3e3f284737f123938d83be728f': (e)ac3: clip surround mix level indexes. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 62f88d042a..6842e9e207 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -237,9 +237,9 @@ static int ac3_parse_header(AC3DecodeContext *s)
if (get_bits1(gbc)) {
s->preferred_downmix = get_bits(gbc, 2);
s->center_mix_level_ltrt = get_bits(gbc, 3);
- s->surround_mix_level_ltrt = get_bits(gbc, 3);
+ s->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7);
s->center_mix_level = get_bits(gbc, 3);
- s->surround_mix_level = get_bits(gbc, 3);
+ s->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7);
}
if (get_bits1(gbc)) {
s->dolby_surround_ex_mode = get_bits(gbc, 2);