Fixed thread exit problems

This commit is contained in:
Robert Osfield
2009-03-08 16:48:48 +00:00
parent 7473b06275
commit 73c2615d17
7 changed files with 48 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ FFmpegDecoder::FFmpegDecoder() :
FFmpegDecoder::~FFmpegDecoder()
{
close();
close(true);
}
@@ -123,10 +123,13 @@ bool FFmpegDecoder::open(const std::string & filename)
void FFmpegDecoder::close()
void FFmpegDecoder::close(bool waitForThreadToExit)
{
flushAudioQueue();
flushVideoQueue();
m_audio_decoder.close(waitForThreadToExit);
m_video_decoder.close(waitForThreadToExit);
}