1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Make opt_default() print an error message and exit if the option

supplied is not recognized.

Originally committed as revision 21960 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2010-02-22 12:28:51 +00:00
parent fb030bd046
commit 33bc794738

View File

@ -214,8 +214,10 @@ int opt_default(const char *opt, const char *arg){
fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
exit(1); exit(1);
} }
if(!o) if (!o) {
return -1; 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)); // 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));