diff options
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 */ |