[FFmpeg-devel] [PATCH] Make the image2 demuxer log a more explicative error message in case the user requests to write more than one file and the path does not contain the "%d"/"%0Nd" pattern.

Janne Grunau janne-ffmpeg
Fri Jan 28 18:02:03 CET 2011


On Wed, Jan 26, 2011 at 11:03:38PM +0100, Stefano Sabatini wrote:
> ---
>  libavformat/img2.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/img2.c b/libavformat/img2.c
> index 71f1dd0..c817fde 100644
> --- a/libavformat/img2.c
> +++ b/libavformat/img2.c
> @@ -347,7 +347,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
>      if (!img->is_pipe) {
>          if (av_get_frame_filename(filename, sizeof(filename),
>                                    img->path, img->img_number) < 0 && img->img_number>1) {
> -            av_log(s, AV_LOG_ERROR, "Could not get frame filename from pattern\n");
> +            av_log(s, AV_LOG_ERROR,
> +                   "Could not get frame filename number %d from pattern '%s'\n",
> +                   img->img_number, img->path);
>              return AVERROR(EIO);
>          }
>          for(i=0; i<3; i++){

ok and queued.

Please try to use git conventions when writing commit messages. That is
onel line with ~70 characters as subject and optionally one empty line
and then as much text with lines with 80 or less charcaters.

Janne



More information about the ffmpeg-devel mailing list