]> git.sesse.net Git - ffmpeg/blobdiff - fftools/ffmpeg.c
fftools/ffmpeg: add new abort_on flag which aborts if there is a stream which receive...
[ffmpeg] / fftools / ffmpeg.c
index ad95a0e4179918ac0942249d290866f02e104fbd..de456df040ea5238b9d082446950fa4ead2f40d1 100644 (file)
@@ -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)) {