diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-03-17 10:00:38 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-03-24 06:16:58 +0100 |
commit | f759f66e367bc62ed7738a51040f775b656a60d8 (patch) | |
tree | 172cd8f50d0de897aadb51ac34b5bfa97752f2bc | |
parent | 781d97fd54b1f0d8f4f7536dbd932dca6445476e (diff) | |
download | ffmpeg-f759f66e367bc62ed7738a51040f775b656a60d8.tar.gz |
avconv: explicitly report when the muxing overhead is unknown
-rw-r--r-- | avconv.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -858,17 +858,21 @@ static void print_report(int is_last_report, int64_t timer_start) if (is_last_report) { int64_t raw = audio_size + video_size + extra_size; - float percent = 0.0; + float percent = -1.0; if (raw) percent = 100.0 * (total_size - raw) / raw; av_log(NULL, AV_LOG_INFO, "\n"); - av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB global headers:%1.0fkB muxing overhead %f%%\n", + av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB global headers:%1.0fkB muxing overhead: ", video_size / 1024.0, audio_size / 1024.0, extra_size / 1024.0, - percent); + if (percent >= 0.0) + av_log(NULL, AV_LOG_INFO, "%f%%", percent); + else + av_log(NULL, AV_LOG_INFO, "unknown"); + av_log(NULL, AV_LOG_INFO, "\n"); } } |