diff options
author | Tim Walker <tdskywalker@gmail.com> | 2014-01-17 16:06:34 +0100 |
---|---|---|
committer | Tim Walker <tdskywalker@gmail.com> | 2014-01-19 19:12:52 +0100 |
commit | ade75fb811500f3e3f284737f123938d83be728f (patch) | |
tree | f02cd679ccadb318d23846ec97200179b7303807 /libavcodec/eac3dec.c | |
parent | c229f571fd3c7d7b567c27c87b2bbcdaee1b0e9f (diff) | |
download | ffmpeg-ade75fb811500f3e3f284737f123938d83be728f.tar.gz |
(e)ac3: clip surround mix level indexes.
Values 0-2 are reserved, 3 (-1.5dB) should be used instead.
Diffstat (limited to 'libavcodec/eac3dec.c')
-rw-r--r-- | libavcodec/eac3dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index dfd78c6ad7..95ee33f823 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -353,8 +353,8 @@ int ff_eac3_parse_header(AC3DecodeContext *s) } if (s->channel_mode & 4) { /* if a surround channel exists */ - s->surround_mix_level_ltrt = get_bits(gbc, 3); - s->surround_mix_level = get_bits(gbc, 3); + s->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7); + s->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7); } } |