X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=fftools%2Fffmpeg.c;h=de456df040ea5238b9d082446950fa4ead2f40d1;hb=efe7a593649877e4fa185e01479cee3e1280ec70;hp=ad95a0e4179918ac0942249d290866f02e104fbd;hpb=64b12624e2d36beda90a4725e3ee43d7d0723213;p=ffmpeg diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index ad95a0e4179..de456df040e 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4713,6 +4713,10 @@ static int transcode(void) av_freep(&ost->enc_ctx->stats_in); } total_packets_written += ost->packets_written; + if (!ost->packets_written && (abort_on_flags & ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM)) { + av_log(NULL, AV_LOG_FATAL, "Empty output on stream %d.\n", i); + exit_program(1); + } } if (!total_packets_written && (abort_on_flags & ABORT_ON_FLAG_EMPTY_OUTPUT)) {