[xiph-commits] r16980 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Wed Mar 17 08:52:24 PDT 2010


Author: j
Date: 2010-03-17 08:52:24 -0700 (Wed, 17 Mar 2010)
New Revision: 16980

Modified:
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
warn if more than one input is given

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2010-03-16 03:47:45 UTC (rev 16979)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2010-03-17 15:52:24 UTC (rev 16980)
@@ -2537,7 +2537,7 @@
         snprintf(outputfile_name, sizeof(outputfile_name), "-");
         outputfile_set = 1;
     }
-    while(optind<argc) {
+    if(optind<argc) {
         /* assume that anything following the options must be a filename */
         snprintf(inputfile_name,sizeof(inputfile_name),"%s",argv[optind]);
         if (!strcmp(inputfile_name,"-")) {
@@ -2559,6 +2559,9 @@
         }
         optind++;
     }
+    if(optind<argc) {
+        fprintf(stderr, "WARNING: Only one input file supported, others will be ignored\n");
+    }
 
     //FIXME: is using_stdin still neded? is it needed as global variable?
     using_stdin |= !strcmp(inputfile_name, "pipe:" ) ||



More information about the commits mailing list