From 3ee463e80cc49e0d8a7002e9244d4b4679ef4a88 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 5 Feb 2020 19:04:10 +0100 Subject: [PATCH] read stats old --- stream/stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stream/stream.c b/stream/stream.c index 072672d1ed..6e2e19e91f 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -337,8 +337,13 @@ static int stream_read_unbuffered(stream_t *s, void *buf, int len) int res = 0; s->buf_pos = s->buf_len = 0; // we will retry even if we already reached EOF previously. - if (s->fill_buffer && !mp_cancel_test(s->cancel)) + if (s->fill_buffer && !mp_cancel_test(s->cancel)) { + if (!s->underlying) + MP_STATS(s, "value %d read-start", len); res = s->fill_buffer(s, buf, len); + if (!s->underlying) + MP_STATS(s, "value %d read-end", len); + } if (res <= 0) { s->eof = 1; return 0;