OSDN Git Service

fix handling of special case for lowest snroffset. regressions are unaffected.
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 20 Mar 2007 02:12:13 +0000 (02:12 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 20 Mar 2007 02:12:13 +0000 (02:12 +0000)
Originally committed as revision 8450 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ac3.c

index a51aca0..3749d02 100644 (file)
@@ -175,6 +175,12 @@ void ff_ac3_bit_alloc_calc_bap(int16_t *mask, int16_t *psd, int start, int end,
 {
     int i, j, k, end1, v, address;
 
+    /* special case, if snroffset is -960, set all bap's to zero */
+    if(snroffset == -960) {
+        memset(bap, 0, 256);
+        return;
+    }
+
     i = start;
     j = masktab[start];
     do {