From f4730a58454283ef1141be4152b53a2b45e5a200 Mon Sep 17 00:00:00 2001 From: Marton Balint Date: Thu, 15 Oct 2015 00:08:43 +0200 Subject: ffmpeg: exit on av_write_trailer failure if exit_on_error is set Reviewed-by: Michael Niedermayer Signed-off-by: Marton Balint --- ffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 252bc0df58..4a6031f16f 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 of %s: %s", os->filename, av_err2str(ret)); + if (exit_on_error) + exit_program(1); } } -- cgit v1.2.3