[FFmpeg-devel] [PATCH 2/5] ffmpeg: exit on av_write_trailer failure if exit_on_error is set

Marton Balint cus at passwd.hu
Sun Oct 18 00:24:04 CEST 2015


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffmpeg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index 95f7e2f..94dfb04 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -4106,6 +4106,8 @@ static int transcode(void)
         os = output_files[i]->ctx;
         if ((ret = av_write_trailer(os)) < 0) {
             av_log(NULL, AV_LOG_ERROR, "Error writing trailer: %s", av_err2str(ret));
+            if (exit_on_error)
+                exit_program(1);
         }
     }
 
-- 
2.1.4



More information about the ffmpeg-devel mailing list