summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-06 15:55:13 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-07 05:03:15 -0800
commit6632d6e2872ef587f15331abe548efece10a6ba6 (patch)
treea257535647cf28bf8641143261f5135e68fd761a /stream
parentebe0f5d31356422e72ade81cf43794116f32c12d (diff)
downloadmpv-6632d6e2872ef587f15331abe548efece10a6ba6.tar.bz2
mpv-6632d6e2872ef587f15331abe548efece10a6ba6.tar.xz
cache: fix --cache-initial status message
For quite some time, msg.c hasn't output partial log messages anymore, and instead buffered them in memory. This means the MP_INFO() statement here just kept appending the message to memory, instead of outputting it. Easy enough to fix by abusing the status line (which means the frontend and this code will "fight" for the status line, but this code seems to win usually, as the frontend doesn't update it so often). Users should probably really switch to --cache-pause-initial. Fixes #5360.
Diffstat (limited to 'stream')
-rw-r--r--stream/cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/stream/cache.c b/stream/cache.c
index 10e1bd7ce7..fb7927f0b1 100644
--- a/stream/cache.c
+++ b/stream/cache.c
@@ -790,9 +790,9 @@ int stream_cache_init(stream_t *cache, stream_t *stream,
struct stream_cache_info info;
if (stream_control(s->cache, STREAM_CTRL_GET_CACHE_INFO, &info) < 0)
break;
- MP_INFO(s, "\rCache fill: %5.2f%% "
- "(%" PRId64 " bytes) ", 100.0 * info.fill / s->buffer_size,
- info.fill);
+ mp_msg(s->log, MSGL_STATUS, "Cache fill: %5.2f%% "
+ "(%" PRId64 " bytes)", 100.0 * info.fill / s->buffer_size,
+ info.fill);
if (info.fill >= min)
break;
if (info.idle)
@@ -804,6 +804,5 @@ int stream_cache_init(stream_t *cache, stream_t *stream,
cache_wakeup_and_wait(s, &(double){0});
pthread_mutex_unlock(&s->mutex);
}
- MP_INFO(s, "\n");
return 1;
}