summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index f86ecd554c..4b4fac8ace 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1082,10 +1082,14 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
oc = output_files[0]->ctx;
total_size = avio_size(oc->pb);
- if (total_size < 0) { // FIXME improve avio_size() so it works with non seekable output too
+ if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too
total_size = avio_tell(oc->pb);
- if (total_size < 0)
- total_size = 0;
+ if (total_size < 0) {
+ char errbuf[128];
+ av_strerror(total_size, errbuf, sizeof(errbuf));
+ av_log(NULL, AV_LOG_VERBOSE, "Bitrate not available, "
+ "avio_tell() failed: %s\n", errbuf);
+ total_size = 0;
}
buf[0] = '\0';