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