Fixed a DTX bug by changing the order of the test in case we have a null mode.
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 20 Aug 2007 12:45:42 +0000 (12:45 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 20 Aug 2007 12:45:42 +0000 (12:45 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@13579 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/nb_celp.c

index 7bb4c1e..bf7a641 100644 (file)
@@ -355,7 +355,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
 
 
       /*Open-loop pitch*/
-      if ((st->complexity>2 && SUBMODE(have_subframe_gain)<3) || !st->submodes[st->submodeID] || st->vbr_enabled || st->vad_enabled || SUBMODE(forced_pitch_gain) ||
+      if (!st->submodes[st->submodeID] || (st->complexity>2 && SUBMODE(have_subframe_gain)<3) || st->vbr_enabled || st->vad_enabled || SUBMODE(forced_pitch_gain) ||
           SUBMODE(lbr_pitch) != -1)
       {
          int nol_pitch[6];