Commits

Anonymous committed 6f6415f

Fixed some closing issues, and turned off all the extra writes to the
console.

  • Participants
  • Parent commits 269ca12
  • Branches tylerthemovie

Comments (0)

Files changed (2)

File src/_gmovie.c

 		while(movie->audio_pkt_size > 0)
         {
         	GRABGIL
-        	PySys_WriteStdout("audio_thread: filling up the buffer...\n");
+//        	PySys_WriteStdout("audio_thread: filling up the buffer...\n");
 			RELEASEGIL
 			data_size = sizeof(movie->audio_buf1);
             len1 += avcodec_decode_audio2(dec, (int16_t *)movie->audio_buf1, &data_size, movie->audio_pkt_data, movie->audio_pkt_size);
 			movie->audio_tid = SDL_CreateThread(audio_thread, movie);*/
 		movie->paused=0;
 		state =decoder(movie);
-		stream_component_close(movie, movie->video_st->index);
-		//stream_component_close(movie, movie->audio_st->index);
+		if(movie->video_st)
+			stream_component_close(movie, movie->video_st->index);
+		if(movie->audio_st)
+			stream_component_close(movie, movie->audio_st->index);
 	}
 	if(gstate==PyGILState_LOCKED) RELEASEGIL	
 	return state;

File src/_gsound.c

 	mix->abuf=NULL;
 	PyMem_Free(mix);
 	mix=NULL;
-	PySys_WriteStdout("Callback called.\n");
+	//PySys_WriteStdout("Callback called.\n");
 	playBuffer(NULL, (uint32_t) 0);
-	PySys_WriteStdout("Callback finished.\n");
+	//PySys_WriteStdout("Callback finished.\n");
 	//PyGILState_Release(gstate);
 }