ffmpeg: exit on av_write_trailer failure if exit_on_error is set
authorMarton Balint <cus@passwd.hu>
Wed, 14 Oct 2015 22:08:43 +0000 (00:08 +0200)
committerMarton Balint <cus@passwd.hu>
Thu, 22 Oct 2015 03:07:45 +0000 (05:07 +0200)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
ffmpeg.c

index 252bc0d..4a6031f 100644 (file)
--- 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);
         }
     }