Browse code

Make ffmpeg print in the error message the exact line of a preset file containing an invalid option or value, and also how the option and the value have been parsed.

Originally committed as revision 15903 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini authored on 2008/11/22 07:56:08
Showing 1 changed files
... ...
@@ -3714,7 +3714,7 @@ static int opt_preset(const char *opt, const char *arg)
3714 3714
         }else if(!strcmp(tmp, "scodec")){
3715 3715
             opt_subtitle_codec(tmp2);
3716 3716
         }else if(opt_default(tmp, tmp2) < 0){
3717
-            fprintf(stderr, "%s: Invalid option or argument: %s=%s\n", filename, tmp, tmp2);
3717
+            fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2);
3718 3718
             av_exit(1);
3719 3719
         }
3720 3720
     }