decoder/Control: caller must lock mutex for Start()

This commit is contained in:
Max Kellermann
2017-12-22 00:59:50 +01:00
parent 739e1da279
commit 910496cea9
3 changed files with 6 additions and 7 deletions

View File

@@ -94,8 +94,6 @@ DecoderControl::Start(std::unique_ptr<DetachedSong> _song,
SongTime _start_time, SongTime _end_time,
MusicBuffer &_buffer, MusicPipe &_pipe) noexcept
{
const std::lock_guard<Mutex> protect(mutex);
assert(_song != nullptr);
assert(_pipe.IsEmpty());

View File

@@ -372,6 +372,8 @@ public:
/**
* Start the decoder.
*
* Caller must lock the object.
*
* @param song the song to be decoded; the given instance will be
* owned and freed by the decoder
* @param start_time see #DecoderControl