pipe: lock the mutex in music_pipe_size()

This commit is contained in:
Max Kellermann 2011-07-20 18:50:30 +02:00
parent d97c46bcdc
commit a26f2ef17d

View File

@ -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;
}