changeset 7850:77030651ddd0 libavcodec

Only read some of TNS bitstream data in the case that the TNS filter order is non-zero as per the specification. Patch by Alex Converse (alex converse gmail com) Fixes another issue pertaining to issue632
author superdump
date Fri, 12 Sep 2008 14:32:49 +0000
parents 2bfde5b45e01
children a6afd0f2a849
files aac.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Thu Sep 11 19:10:26 2008 +0000
+++ b/aac.c	Fri Sep 12 14:32:49 2008 +0000
@@ -629,6 +629,7 @@
                     tns->order[w][filt] = 0;
                     return -1;
                 }
+                if (tns->order[w][filt]) {
                 tns->direction[w][filt] = get_bits1(gb);
                 coef_compress = get_bits1(gb);
                 coef_len = coef_res + 3 - coef_compress;
@@ -636,6 +637,7 @@
 
                 for (i = 0; i < tns->order[w][filt]; i++)
                     tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
+                }
             }
         }
     }