public synchronized void run() {

      running = true;

      while (running) {

         while (paused && !resetReq) {

            try {
               Thread.sleep(50);
            } catch (Exception e) {
            }
            startTime += 50;
         }

         try {
            readFrame();
            listener.newFrame();
         } catch (IOException ioe) {
            listener.showNewImage(null);
            break;
         }

         if (fastForward == true) {
            startTime -= (frameTime - lastFrameTime);
         } else {
            while ((System.currentTimeMillis() - startTime < frameTime)
                  && !paused) {
               try {
                  Thread.sleep(100);
               } catch (Exception e) {
               }
            }

            // System.out.println(
            // "FrameTime:"+frameTime+">"+(System.currentTimeMillis()-startTime));
         }

         lastFrameTime = frameTime;
      }

      listener.playerStopped();
   }