read stats old

This commit is contained in:
wm4 2020-02-05 19:04:10 +01:00
parent 5f83b6a5f5
commit 3ee463e80c
1 changed files with 6 additions and 1 deletions

View File

@ -337,8 +337,13 @@ static int stream_read_unbuffered(stream_t *s, void *buf, int len)
int res = 0; int res = 0;
s->buf_pos = s->buf_len = 0; s->buf_pos = s->buf_len = 0;
// we will retry even if we already reached EOF previously. // 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); res = s->fill_buffer(s, buf, len);
if (!s->underlying)
MP_STATS(s, "value %d read-end", len);
}
if (res <= 0) { if (res <= 0) {
s->eof = 1; s->eof = 1;
return 0; return 0;