[FFmpeg-devel] [PATCH] Improve error-messaging with ffmpeg presets

Stefano Sabatini stefano.sabatini-lala
Sat Oct 4 11:22:03 CEST 2008


On date Sunday 2008-09-28 20:59:52 +0200, Stefano Sabatini encoded:
> Hi,
> as in subject.
> 
> Two hunks will correspond to two separate commits.
[...]
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 15445)
> +++ ffmpeg.c	(working copy)
> @@ -3733,7 +3733,7 @@
>      }
>  
>      if(!f){
> -        fprintf(stderr, "Preset file not found\n");
> +        fprintf(stderr, "Preset file '%s' not found\n", arg);
>          av_exit(1);
>      }
>  
> @@ -3752,8 +3752,10 @@
>              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);

Ping?

Regards.
-- 
FFmpeg = Free and Fantastic Multipurpose Proud Explosive Gangster




More information about the ffmpeg-devel mailing list