[xiph-commits] r10001 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Thu Sep 8 04:57:52 PDT 2005


Author: j
Date: 2005-09-08 04:57:46 -0700 (Thu, 08 Sep 2005)
New Revision: 10001

Modified:
   trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
make sure inputfile_name != outputfile_name => also support ogg files as input

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2005-09-08 01:09:37 UTC (rev 10000)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2005-09-08 11:57:46 UTC (rev 10001)
@@ -1103,10 +1103,13 @@
         if(outputfile_set!=1){
             sprintf(outputfile_name, "%s", argv[optind]);
             if(str_ptr = rindex(outputfile_name, '.')) {
-                sprintf(str_ptr, ".ogg");
+              sprintf(str_ptr, ".ogg");
+              if(!strcmp(inputfile_name, outputfile_name)){
+                sprintf(outputfile_name, "%s.ogg", inputfile_name);
+              }
             }
-           else {
-                sprintf(outputfile_name, "%s.ogg", outputfile_name);
+            else {
+                 sprintf(outputfile_name, "%s.ogg", outputfile_name);
             }
             outputfile_set=1;
         }



More information about the commits mailing list