From a1240c0522d10b937ef5fb88c2134452ae352fb5 Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Thu, 15 Oct 2015 00:06:12 +0200 Subject: [PATCH] ffmpeg: log failed av_write_trailer Reviewed-by: Michael Niedermayer Signed-off-by: Marton Balint --- ffmpeg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 36a68fbd4c..252bc0df58 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -4104,7 +4104,9 @@ static int transcode(void) /* write the trailer if needed and close file */ for (i = 0; i < nb_output_files; i++) { os = output_files[i]->ctx; - av_write_trailer(os); + if ((ret = av_write_trailer(os)) < 0) { + av_log(NULL, AV_LOG_ERROR, "Error writing trailer of %s: %s", os->filename, av_err2str(ret)); + } } /* dump report by using the first video and audio streams */ -- GitLab