[FFmpeg-soc] [soc]: r3568 - eac3/eac3dec.c

jbr subversion at mplayerhq.hu
Sun Aug 24 06:20:10 CEST 2008


Author: jbr
Date: Sun Aug 24 06:20:10 2008
New Revision: 3568

Log:
limit GAQ gain group code to valid values

Modified:
   eac3/eac3dec.c

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Sun Aug 24 06:20:10 2008
@@ -104,7 +104,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
         for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
             if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < end_bap) {
                 if (gc++ == 2) {
-                    int group_gain = get_bits(gbc, 5);
+                    int group_gain = FFMIN(get_bits(gbc, 5), 26);
                     gaq_gain[gs++] = ff_ac3_ungroup_3_in_5_bits_tab[group_gain][0];
                     gaq_gain[gs++] = ff_ac3_ungroup_3_in_5_bits_tab[group_gain][1];
                     gaq_gain[gs++] = ff_ac3_ungroup_3_in_5_bits_tab[group_gain][2];



More information about the FFmpeg-soc mailing list