From a26f2ef17df9a741ba759b31a3d6f5a8f7068b6d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 20 Jul 2011 18:50:30 +0200 Subject: pipe: lock the mutex in music_pipe_size() --- src/pipe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipe.c b/src/pipe.c index 7e4b0d081..2f5f70e43 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -187,5 +187,8 @@ music_pipe_push(struct music_pipe *mp, struct music_chunk *chunk) unsigned music_pipe_size(const struct music_pipe *mp) { - return mp->size; + g_mutex_lock(mp->mutex); + unsigned size = mp->size; + g_mutex_unlock(mp->mutex); + return size; } -- cgit v1.2.3