[FFmpeg-devel] [PATCH] Display decoded frame number on error

Nicolas George george at nsup.org
Fri Jul 12 12:52:49 EEST 2019


RĂ©mi Achard (12019-07-12):
> ---
>  fftools/ffmpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 01f04103cf..aaeabe512b 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2107,7 +2107,7 @@ static void check_decode_result(InputStream *ist, int *got_output, int ret)
>      if (*got_output && ist) {
>          if (ist->decoded_frame->decode_error_flags || (ist->decoded_frame->flags & AV_FRAME_FLAG_CORRUPT)) {
>              av_log(NULL, exit_on_error ? AV_LOG_FATAL : AV_LOG_WARNING,
> -                   "%s: corrupt decoded frame in stream %d\n", input_files[ist->file_index]->ctx->url, ist->st->index);

> +                   "%s: corrupt decoded frame %llu in stream %d\n", input_files[ist->file_index]->ctx->url, ist->frames_decoded + 1, ist->st->index);

frames_decoded is uint64_t, not long long; %lld is for long long.

Also: what is the use case for this change?

>              if (exit_on_error)
>                  exit_program(1);
>          }

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190712/6fa9a589/attachment.sig>


More information about the ffmpeg-devel mailing list