aboutsummaryrefslogtreecommitdiffstats
path: root/src/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/pipe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pipe.c b/src/pipe.c
index db80c2b2d..d8131432f 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;
}