X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fimg2enc.c;h=a09cc8ec501e5a9a8426404890af9438ed467ef0;hb=ebdc5c419aef0d9eed8c1ec57b30238194c1db0a;hp=b680676bff7b44df6db8531ec36ac28f89b95c76;hpb=4251e25272d6a51433805956ea26425d7ccd74cb;p=ffmpeg diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index b680676bff7..bec4bf81dde 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -53,7 +53,7 @@ static int write_header(AVFormatContext *s) AVStream *st = s->streams[0]; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(st->codecpar->format); - av_strlcpy(img->path, s->filename, sizeof(img->path)); + av_strlcpy(img->path, s->url, sizeof(img->path)); /* find format */ if (s->oformat->flags & AVFMT_NOFILE) @@ -110,7 +110,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0 && img->img_number > 1) { av_log(s, AV_LOG_ERROR, - "Could not get frame filename number %d from pattern '%s' (either set update or use a pattern like %%03d within the filename pattern)\n", + "Could not get frame filename number %d from pattern '%s'. " + "Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %%03d within the filename.\n", img->img_number, img->path); return AVERROR(EINVAL); } @@ -156,7 +157,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) av_assert0(!img->split_planes); - ret = avformat_alloc_output_context2(&fmt, NULL, img->muxer, s->filename); + ret = avformat_alloc_output_context2(&fmt, NULL, img->muxer, s->url); if (ret < 0) return ret; st = avformat_new_stream(fmt, NULL);