Commits

zeroth  committed 3ac3443

Looping works properly on positive number integers. If you put in a 3,
you will get 3 plays. Infinite play(negative integers) causes a
seemingly random lockup/infinite loop, as well as a memory leak.

  • Participants
  • Parent commits cc50f85
  • Branches tylerthemovie

Comments (0)

Files changed (2)

File src/_gmovie.c

     if(!q->mutex)
 	    q->mutex = SDL_CreateMutex();
     if(!q->cond)
-    q->cond = SDL_CreateCond();
+    	q->cond = SDL_CreateCond();
     q->abort_request=0;
 
 }

File src/gmovie.c

     movie->paused = 0;
     movie->playing = 1;
     SDL_UnlockMutex(movie->dest_mutex);
-    while(loops>-1)
+    while((loops-1)!=-1)
     {
     	decoder(movie);
     	PySys_WriteStdout("Loops: %i\n", loops);
     	loops--;
+    	if(loops==1)
+    	{
+    		PySys_WriteStdout("Second Loop Around\n");
+    	}
     	movie=stream_open(movie, movie->filename, NULL);
     	movie->paused=0;
     }