[FFmpeg-cvslog] fftools/ffmpeg: Log exit code on exit
softworkz
git at videolan.org
Sat May 3 08:59:18 EEST 2025
ffmpeg | branch: master | softworkz <softworkz at hotmail.com> | Sat Apr 19 23:57:33 2025 +0200| [b322640b4f08655d31aa2c0912d1063f86529e75] | committer: softworkz
fftools/ffmpeg: Log exit code on exit
When viewing logs, there are situations where it is not entirely
clear whether ffmpeg CLI has exited gracefully. The two primary cases
are
- A crash/segfault has occured
Windows for example doesn't output any message to the calling shell
- The process has been terminated (e.g. killed externally)
Printing a message on exit provides a reliable indication that the
process has exited normally.
Printing the exit code is useful as it usually remains invisible
and unnoticed by users running FFmpeg from a shell.
Signed-off-by: softworkz <softworkz at hotmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b322640b4f08655d31aa2c0912d1063f86529e75
---
fftools/ffmpeg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 5d81b1124a..24d43e6197 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1022,5 +1022,8 @@ finish:
sch_free(&sch);
+ av_log(NULL, AV_LOG_VERBOSE, "\n");
+ av_log(NULL, AV_LOG_VERBOSE, "Exiting with exit code %d\n", ret);
+
return ret;
}
More information about the ffmpeg-cvslog
mailing list