Commit a26f2ef1 authored by Max Kellermann's avatar Max Kellermann

pipe: lock the mutex in music_pipe_size()

parent d97c46bc
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment