10l: aacsbr: Fix f_master[2] calculation when k2diff == -1.
authorAlex Converse <alex.converse@gmail.com>
Sun, 20 Jun 2010 19:24:18 +0000 (19:24 +0000)
committerAlex Converse <alex.converse@gmail.com>
Sun, 20 Jun 2010 19:24:18 +0000 (19:24 +0000)
Originally committed as revision 23660 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/aacsbr.c

index c8ff299..94707c9 100644 (file)
@@ -393,7 +393,7 @@ static int sbr_make_f_master(AACContext *ac, SpectralBandReplication *sbr,
         k2diff = sbr->k[2] - sbr->k[0] - sbr->n_master * dk;
         if (k2diff < 0) {
             sbr->f_master[1]--;
-            sbr->f_master[2]-= (k2diff < 1);
+            sbr->f_master[2]-= (k2diff < -1);
         } else if (k2diff) {
             sbr->f_master[sbr->n_master]++;
         }