[FFmpeg-cvslog] r21960 - trunk/cmdutils.c

stefano subversion
Mon Feb 22 13:28:51 CET 2010


Author: stefano
Date: Mon Feb 22 13:28:51 2010
New Revision: 21960

Log:
Make opt_default() print an error message and exit if the option
supplied is not recognized.

Modified:
   trunk/cmdutils.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	Mon Feb 22 13:20:49 2010	(r21959)
+++ trunk/cmdutils.c	Mon Feb 22 13:28:51 2010	(r21960)
@@ -214,8 +214,10 @@ int opt_default(const char *opt, const c
         fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
         exit(1);
     }
-    if(!o)
-        return -1;
+    if (!o) {
+        fprintf(stderr, "Unrecognized option '%s'\n", opt);
+        exit(1);
+    }
 
 //    av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL));
 



More information about the ffmpeg-cvslog mailing list