From: Stefano Sabatini Date: Sat, 18 Oct 2008 18:27:32 +0000 (+0000) Subject: Make ffmpeg abort if a preset file contains an invalid option or X-Git-Tag: v0.5~2174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b73533176b75c7874cdb02dee4eae96080a70928;p=platform%2Fupstream%2Flibav.git Make ffmpeg abort if a preset file contains an invalid option or argument. Originally committed as revision 15636 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/ffmpeg.c b/ffmpeg.c index d8a3d50..c94ca31 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -3710,8 +3710,10 @@ static int opt_preset(const char *opt, const char *arg) opt_video_codec(tmp2); }else if(!strcmp(tmp, "scodec")){ opt_subtitle_codec(tmp2); - }else - opt_default(tmp, tmp2); + }else if(opt_default(tmp, tmp2) < 0){ + fprintf(stderr, "Invalid option or argument: %s=%s\n", tmp, tmp2); + av_exit(1); + } } fclose(f);