diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-08 15:21:34 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-08 15:30:40 +0400 |
commit | ad6a50c0ed39d30f3acbe57c29df8119e1379a3c (patch) | |
tree | 11afd1b4f049bc1d14b28c2a3860d1dc42c21ce5 /libavformat/aviobuf.c | |
parent | 0138fe56563bc7aa59fb69fe81bcf3f5718b17a5 (diff) |
avformat: add writeout_count statistic
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 7a73a1791f..966e0e6a3d 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -131,6 +131,7 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len) s->error = ret; } } + s->writeout_count ++; s->pos += len; } @@ -827,7 +828,9 @@ int avio_close(AVIOContext *s) avio_flush(s); h = s->opaque; av_freep(&s->buffer); - if (!s->write_flag) + if (s->write_flag) + av_log(s, AV_LOG_DEBUG, "Statistics: %d seeks, %d writeouts\n", s->seek_count, s->writeout_count); + else av_log(s, AV_LOG_DEBUG, "Statistics: %"PRId64" bytes read, %d seeks\n", s->bytes_read, s->seek_count); av_free(s); return ffurl_close(h); |