summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 5e9a12741e..a19c81667b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -4054,6 +4054,7 @@ static int transcode(void)
OutputStream *ost;
InputStream *ist;
int64_t timer_start;
+ int64_t total_packets_written = 0;
ret = transcode_init();
if (ret < 0)
@@ -4134,6 +4135,12 @@ static int transcode(void)
if (ost->encoding_needed) {
av_freep(&ost->enc_ctx->stats_in);
}
+ total_packets_written += ost->packets_written;
+ }
+
+ if (!total_packets_written && (abort_on_flags & ABORT_ON_FLAG_EMPTY_OUTPUT)) {
+ av_log(NULL, AV_LOG_FATAL, "Empty output\n");
+ exit_program(1);
}
/* close each decoder */