Skip to content

Commit

Permalink
Ensure music decoder thread is stopped before initializing and starti…
Browse files Browse the repository at this point in the history
…ng it

Fixes #11726
  • Loading branch information
jyavenard committed Aug 5, 2013
1 parent 247cabb commit d911198
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mythplugins/mythmusic/mythmusic/musicplayer.cpp
Expand Up @@ -1372,6 +1372,13 @@ void MusicPlayer::decoderHandlerReady(void)
cddecoder->setDevice(gCDdevice);
#endif

// Decoder thread can't be running while being initialized
if (getDecoder()->isRunning())
{
getDecoder()->stop();
getDecoder()->wait();
}

getDecoder()->setOutput(m_output);
//getDecoder()-> setBlockSize(2 * 1024);
getDecoder()->addListener(this);
Expand Down

0 comments on commit d911198

Please sign in to comment.