put a lomit on nframes...
authorjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 31 Jul 2002 21:18:09 +0000 (21:18 +0000)
committerjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 31 Jul 2002 21:18:09 +0000 (21:18 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@3740 0101bb08-14d6-0310-b084-bc0e0c8e3800

src/speexenc.c

index 85a57ba..26f61fa 100644 (file)
@@ -39,7 +39,7 @@ int oe_write_page(ogg_page *page, FILE *fp)
 }
 
 #define MAX_FRAME_SIZE 2000
-#define MAX_FRAME_BYTES 1000
+#define MAX_FRAME_BYTES 2000
 
 void usage()
 {
@@ -144,6 +144,10 @@ int main(int argc, char **argv)
          } else if (strcmp(long_options[option_index].name,"nframes")==0)
          {
             nframes = atoi (optarg);
+            if (nframes<1)
+               nframes=1;
+            if (nframes>10)
+               nframes=10;
          } else if (strcmp(long_options[option_index].name,"comp")==0)
          {
             complexity = atoi (optarg);