diff mbox

[FFmpeg-devel] img2enc: mention -frames:v in error message

Message ID 20190115002502.15548-1-lou@lrcd.com
State Accepted
Commit d92f06eb6663dce8cb8942a1314f736a07f255e0
Headers show

Commit Message

Lou Logan Jan. 15, 2019, 12:25 a.m. UTC
Signed-off-by: Lou Logan <lou@lrcd.com>
---
 libavformat/img2enc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kieran O Leary Jan. 16, 2019, 7:54 a.m. UTC | #1
On Tue, 15 Jan 2019, 00:25 Lou Logan <lou@lrcd.com wrote:

> Signed-off-by: Lou Logan <lou@lrcd.com>
> ---
>  libavformat/img2enc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
> index a09cc8ec50..bec4bf81dd 100644
> --- a/libavformat/img2enc.c
> +++ b/libavformat/img2enc.c
> @@ -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",
>

Looks good to me. The adding of a dash is useful as my colleagues and I
have seen that error many times and I never really new what 'set update'
meant. I only now looked up -update in the documentation.

-Kieran

                    img->img_number, img->path);
>              return AVERROR(EINVAL);
>          }
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Lou Logan Jan. 22, 2019, 8:20 p.m. UTC | #2
On Tue, Jan 15, 2019, at 10:54 PM, Kieran O Leary wrote:
>
> Looks good to me.

Thanks. Pushed with fixed subject prefix.
diff mbox

Patch

diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index a09cc8ec50..bec4bf81dd 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -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);
         }