Index: /OpenSceneGraph/trunk/src/osgPlugins/quicktime/QuicktimeImageStream.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgPlugins/quicktime/QuicktimeImageStream.cpp (revision 3223)
+++ /OpenSceneGraph/trunk/src/osgPlugins/quicktime/QuicktimeImageStream.cpp (revision 3318)
@@ -47,6 +47,6 @@
 
     {    
-    	OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*s_qtMutex);
-    	osgQuicktime::initQuicktime(); 
+        OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*s_qtMutex);
+        osgQuicktime::initQuicktime(); 
     }
         
@@ -154,6 +154,6 @@
         ThreadCommand cmd = getCmd();
 
-	float currentTime=0.0f;
-	
+        float currentTime=0.0f;
+    
         {
             OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*s_qtMutex);
@@ -168,5 +168,5 @@
                     case THREAD_STOP:
                         SetMovieRate(_data->getMovie(),0);
-                        osg::notify(NOTICE) << "QT-ImageStream: stop at "<< std::endl;
+                        osg::notify(INFO) << "QT-ImageStream: stop at "<< std::endl;
                         playing = false;
                         break;
@@ -183,5 +183,5 @@
                     case THREAD_QUIT: // TODO
                         SetMovieRate(_data->getMovie(),0);
-                        osg::notify(NOTICE) << "QT-ImageStream: quit" << std::endl;
+                        osg::notify(INFO) << "QT-ImageStream: quit" << std::endl;
                         //playing = false;
                         done = true;
@@ -195,18 +195,35 @@
             MoviesTask(_data->getMovie(),0);
 
-	    currentTime = _data->getMovieTime();
+            currentTime = _data->getMovieTime();
         }
         
 
-        if (_lastUpdate!= currentTime) {
+        if (_lastUpdate!= currentTime) 
+        {
+
             dirty();
             _lastUpdate = currentTime;
+
+            if (currentTime>=_data->getMovieDuration())
+            {
+                if (getLoopingMode()==LOOPING)
+                {
+                    rewind();
+                    play();
+                }
+                else
+                {
+                    pause();
+                }
+            }
+
         }
         
-        if (playing) {
+        if (playing)
+        {
             // TODO
         }
         else if (!done)
-	{
+        {
             ::usleep(IDLE_TIMEOUT);
         }
