[MPlayer-cvslog] r32841 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Wed Feb 2 19:30:20 CET 2011


Author: reimar
Date: Wed Feb  2 19:30:20 2011
New Revision: 32841

Log:
Fix r32824: It broke -frames and many, many other things.
Change only the ->eof handling case that needs to be changed
to fix the sample instead.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Tue Feb  1 21:45:41 2011	(r32840)
+++ trunk/mplayer.c	Wed Feb  2 19:30:20 2011	(r32841)
@@ -3660,7 +3660,7 @@ if (mpctx->stream->type == STREAMTYPE_DV
 }
 #endif
 
-while(!mpctx->eof || (mpctx->sh_audio && !mpctx->d_audio->eof)){
+while(!mpctx->eof){
     float aq_sleep_time=0;
 
 if(dvd_last_chapter>0) {
@@ -3724,9 +3724,13 @@ if(!mpctx->sh_video) {
 	  mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO);
 	  mpctx->eof = 1; goto goto_next_file;
       }
-      if (frame_time < 0)
+      if (frame_time < 0) {
+          // if we have no more video, sleep some arbitrary time
+          frame_time = 1.0/20.0;
+          // only stop playing when audio is at end as well
+          if (!mpctx->sh_audio || mpctx->d_audio->eof)
 	  mpctx->eof = 1;
-      else {
+      } else {
 	  // might return with !eof && !blit_frame if !correct_pts
 	  mpctx->num_buffered_frames += blit_frame;
 	  mpctx->time_frame += frame_time / playback_speed;  // for nosound


More information about the MPlayer-cvslog mailing list