diff options
author | Marton Balint <cus@passwd.hu> | 2020-05-13 00:06:08 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-05-26 21:50:50 +0200 |
commit | efe7a593649877e4fa185e01479cee3e1280ec70 (patch) | |
tree | 7117bf9370a49bb9a81b49e5342333de1893700c /fftools/ffmpeg.c | |
parent | 64b12624e2d36beda90a4725e3ee43d7d0723213 (diff) | |
download | ffmpeg-efe7a593649877e4fa185e01479cee3e1280ec70.tar.gz |
fftools/ffmpeg: add new abort_on flag which aborts if there is a stream which received no packets
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index ad95a0e417..de456df040 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)) { |