Index: branches/avi_play/src/lib/graphics/importer/media_container.cc
===================================================================
--- branches/avi_play/src/lib/graphics/importer/media_container.cc	(revision 6159)
+++ branches/avi_play/src/lib/graphics/importer/media_container.cc	(revision 6160)
@@ -42,4 +42,16 @@
   fps = 0;
 
+  /* SDL interprets each pixel as a 32-bit number, so our masks must depend
+     on the endianness (byte order) of the machine */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+  rmask = 0xff000000;
+  gmask = 0x00ff0000;
+  bmask = 0x0000ff00;
+#else
+  rmask = 0x000000ff;
+  gmask = 0x0000ff00;
+  bmask = 0x00ff0000;
+#endif
+
   if (filename != NULL)
     this->loadMedia(filename);
@@ -68,10 +80,10 @@
 }
 
-GLuint MediaContainer::getFrame(int frame_number)
-{
-
-}
-
-SDL_Surface * MediaContainer::getNextFrame()
+SDL_Surface* MediaContainer::getFrame(int frame_number)
+{
+
+}
+
+SDL_Surface* MediaContainer::getNextFrame()
 {
   /* get next frame */
@@ -107,46 +119,8 @@
           memcpy(&data[i*codec_context->width*3], picture->data[0]+i * picture->linesize[0],codec_context->width*sizeof(uint8_t)*3);
 
-Uint32 rmask, gmask, bmask, amask;
-
-    /* SDL interprets each pixel as a 32-bit number, so our masks must depend
-       on the endianness (byte order) of the machine */
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-    rmask = 0xff000000;
-    gmask = 0x00ff0000;
-    bmask = 0x0000ff00;
-    amask = 0x000000ff;
-#else
-    rmask = 0x000000ff;
-    gmask = 0x0000ff00;
-    bmask = 0x00ff0000;
-    amask = 0xff000000;
-#endif
-surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width, codec_context->height,
-                                   32, codec_context->width*sizeof(uint8_t)*3, rmask, gmask, bmask, 0);
-
-return surface;
-        /*glGenTextures(1, &texture);
-        glBindTexture(GL_TEXTURE_2D, texture);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-        // if it is the first frame create texture
-        //if(current_frame == 1)
-        //{
-          // build the texture
-        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, codec_context->width, codec_context->height, 0, GL_RGB, GL_UNSIGNED_BYTE, picture->data);
-        //}
-        // if its not the first use glTexSubImage2D <-- faster then creating always a new texture
-        //else
-        //  glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, codec_context->width, codec_context->height, GL_RGB, GL_UNSIGNED_BYTE, data);
-
-
-        glBindTexture(GL_TEXTURE_2D, 0);*/
-        //////////////////////////////////////////////
-        /////////////////////////////////////////////
-
-        // save frame
-        //this->saveCurrentFrame();
-
-        //return texture;
+        surface = SDL_CreateRGBSurfaceFrom(data, codec_context->width, codec_context->height,
+                                           24, codec_context->width*sizeof(uint8_t)*3, rmask, gmask, bmask, 0);
+
+        return surface;
       }
     }
Index: branches/avi_play/src/lib/graphics/importer/media_container.h
===================================================================
--- branches/avi_play/src/lib/graphics/importer/media_container.h	(revision 6159)
+++ branches/avi_play/src/lib/graphics/importer/media_container.h	(revision 6160)
@@ -32,5 +32,5 @@
 
   double fps;
-  GLuint texture;
+  Uint32 rmask, gmask, bmask;
   SDL_Surface *surface;
   uint8_t* data;
@@ -53,6 +53,6 @@
   ~MediaContainer();
 
-  GLuint getFrame(int frame_number);
-  SDL_Surface * getNextFrame();
+  SDL_Surface* getFrame(int frame_number);
+  SDL_Surface* getNextFrame();
   void loadMedia(const char* filename);
 
Index: branches/avi_play/src/subprojects/importer/importer.cc
===================================================================
--- branches/avi_play/src/subprojects/importer/importer.cc	(revision 6159)
+++ branches/avi_play/src/subprojects/importer/importer.cc	(revision 6160)
@@ -40,7 +40,4 @@
   SDL_Delay(1000);
 
-  // get the frame and save it as an image
-  //while(movie->getNextFrame() != NULL);	
-
 }
 
@@ -60,6 +57,6 @@
 void Framework::moduleTick(float dt)
 {
-  //while(movie->getNextFrame() != NULL);
-  //  movie->saveCurrentFrame();	
+  while(movie->getNextFrame() != NULL);
+    movie->saveCurrentFrame();	
 }
 
Index: branches/avi_play/src/subprojects/importer/multitex.cc
===================================================================
--- branches/avi_play/src/subprojects/importer/multitex.cc	(revision 6159)
+++ branches/avi_play/src/subprojects/importer/multitex.cc	(revision 6160)
@@ -52,16 +52,10 @@
 
   seq = new TextureSequence();
-  //for (int i = 1; i < argc; i++)
-  //{
-  //  seq->addFrame(argv[i]);
-  //  printf("%s\n", argv[i]);
-  //}
+  while(seq->addFrame(movie->getNextFrame()) != NULL);
 
-  // add one frame from the movie
-  //seq->addFrame(movie->getNextFrame());
-  //GLuint tex;
-  while(seq->addFrame(movie->getNextFrame()) != NULL)
-
-  test = new Texture(argv[1]);
+  test = new Texture();
+  
+  // ???: Only works if i set as diffuse map an image
+  // from the avifile created with importer (frameXX.ppm)
   testMat->setDiffuseMap(argv[1]);
 
