Show
Ignore:
Timestamp:
03/08/09 17:48:48 (4 years ago)
Author:
robert
Message:

Fixed thread exit problems

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp

    r9861 r9869  
    3535    osg::notify(osg::NOTICE)<<"Destructing FFmpegDecoderVideo..."<<std::endl; 
    3636 
     37 
    3738    if (isRunning()) 
    3839    { 
    3940        m_exit = true; 
     41#if 0         
     42        while(isRunning()) { OpenThreads::YieldCurrentThread(); } 
     43#else         
    4044        join(); 
     45#endif 
    4146    } 
    4247     
     
    102107} 
    103108 
     109 
     110void FFmpegDecoderVideo::close(bool waitForThreadToExit) 
     111{ 
     112    m_exit = true; 
     113     
     114    if (isRunning() && waitForThreadToExit) 
     115    { 
     116        while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); } 
     117    } 
     118} 
    104119 
    105120