[xiph-commits] r14268 - trunk/vorbis-tools/oggenc

conrad at svn.xiph.org conrad at svn.xiph.org
Mon Dec 3 00:50:49 PST 2007


Author: conrad
Date: 2007-12-03 00:50:48 -0800 (Mon, 03 Dec 2007)
New Revision: 14268

Modified:
   trunk/vorbis-tools/oggenc/oggenc.c
Log:
Fix bugs introduced in changeset:14147.
1) Use .ogg for Ogg Vorbis I (without skeleton), and .oga for streams with
skeleton (due to wrong sense in ternary operator)
2) Don't print an "unknown option" warning when using -k or --skeleton
(due to missing break in switch statement).


Modified: trunk/vorbis-tools/oggenc/oggenc.c
===================================================================
--- trunk/vorbis-tools/oggenc/oggenc.c	2007-12-03 01:33:47 UTC (rev 14267)
+++ trunk/vorbis-tools/oggenc/oggenc.c	2007-12-03 08:50:48 UTC (rev 14268)
@@ -267,7 +267,7 @@
                 end = strrchr(infiles[i], '.');
                 end = end?end:(start + strlen(infiles[i])+1);
 
-                char *extension = (opt.with_skeleton) ? ".ogg" : ".oga";
+                char *extension = (opt.with_skeleton) ? ".oga" : ".ogg";
                 out_fn = malloc(end - start + 5);
                 strncpy(out_fn, start, end-start);
                 out_fn[end-start] = 0;
@@ -597,7 +597,7 @@
     int ret;
     int option_index = 1;
 
-    while((ret = getopt_long(argc, argv, "A:a:b:B:c:C:d:G:hl:m:M:n:N:o:P:q:QrR:s:t:vX:k", 
+    while((ret = getopt_long(argc, argv, "A:a:b:B:c:C:d:G:hkl:m:M:n:N:o:P:q:QrR:s:t:vX:", 
                     long_options, &option_index)) != -1)
     {
         switch(ret)
@@ -852,6 +852,7 @@
                 break;
             case 'k':
                 opt->with_skeleton = 1;
+                break;
             case '?':
                 fprintf(stderr, _("WARNING: Unknown option specified, ignoring->\n"));
                 break;



More information about the commits mailing list