diff --git a/ffmpeg.c b/ffmpeg.c index 252bc0df586b990dd1408add52d741e584455fa6..4a6031f16ff340c3891f3068058e664cab80f237 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); } }