Index: OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
===================================================================
--- OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp (revision 9861)
+++ OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp (revision 9869)
@@ -35,8 +35,13 @@
     osg::notify(osg::NOTICE)<<"Destructing FFmpegDecoderVideo..."<<std::endl;
 
+
     if (isRunning())
     {
         m_exit = true;
+#if 0        
+        while(isRunning()) { OpenThreads::YieldCurrentThread(); }
+#else        
         join();
+#endif
     }
     
@@ -102,4 +107,14 @@
 }
 
+
+void FFmpegDecoderVideo::close(bool waitForThreadToExit)
+{
+    m_exit = true;
+    
+    if (isRunning() && waitForThreadToExit)
+    {
+        while(isRunning()) { OpenThreads::Thread::YieldCurrentThread(); }
+    }
+}
 
 
