[Mplayer-cvslog] CVS: main mplayer.c,1.369,1.370

Alban Bedel CVS albeu at mplayer.dev.hu
Thu Jan 17 21:25:59 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv16022

Modified Files:
	mplayer.c 
Log Message:
Fixed bug with benchmark option


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.369
retrieving revision 1.370
diff -u -r1.369 -r1.370
--- mplayer.c	17 Jan 2002 00:31:44 -0000	1.369
+++ mplayer.c	17 Jan 2002 20:25:55 -0000	1.370
@@ -345,7 +345,6 @@
 }
 
 void exit_player(char* how){
- total_time_usage_start=GetTimer()-total_time_usage_start;
 
   uninit_player(INITED_ALL);
 
@@ -353,20 +352,6 @@
 
   if(how) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Exiting,how);
   mp_msg(MSGT_CPLAYER,MSGL_V,"max framesize was %d bytes\n",max_framesize);
-  if(benchmark){
-      double tot=video_time_usage+vout_time_usage+audio_time_usage;
-      double total_time_usage=(float)total_time_usage_start*0.000001;
-      mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARKs: V:%8.3fs VO:%8.3fs A:%8.3fs Sys:%8.3fs = %8.3fs\n",
-          video_time_usage,vout_time_usage,audio_time_usage,
-	  total_time_usage-tot,total_time_usage);
-      if(total_time_usage>0.0)
-      mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARK%%: V:%8.4f%% VO:%8.4f%% A:%8.4f%% Sys:%8.4f%% = %8.4f%%\n",
-          100.0*video_time_usage/total_time_usage,
-	  100.0*vout_time_usage/total_time_usage,
-	  100.0*audio_time_usage/total_time_usage,
-	  100.0*(total_time_usage-tot)/total_time_usage,
-	  100.0);
-  }
 
   exit(1);
 }
@@ -2366,7 +2351,26 @@
 
 goto_next_file:  // don't jump here after ao/vo/getch initialization!
 
+
+if(benchmark){
+  double tot=video_time_usage+vout_time_usage+audio_time_usage;
+  double total_time_usage;
+  total_time_usage_start=GetTimer()-total_time_usage_start;
+  total_time_usage = (float)total_time_usage_start*0.000001;
+  mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARKs: V:%8.3fs VO:%8.3fs A:%8.3fs Sys:%8.3fs = %8.3fs\n",
+	 video_time_usage,vout_time_usage,audio_time_usage,
+	 total_time_usage-tot,total_time_usage);
+  if(total_time_usage>0.0)
+    mp_msg(MSGT_CPLAYER,MSGL_INFO,"BENCHMARK%%: V:%8.4f%% VO:%8.4f%% A:%8.4f%% Sys:%8.4f%% = %8.4f%%\n",
+	   100.0*video_time_usage/total_time_usage,
+	   100.0*vout_time_usage/total_time_usage,
+	   100.0*audio_time_usage/total_time_usage,
+	   100.0*(total_time_usage-tot)/total_time_usage,
+	   100.0);
+}
+
 if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
+  eof = eof == PT_NEXT_ENTRY ? 1 : -1;
   if(play_tree_iter_step(playtree_iter,eof,0) == PLAY_TREE_ITER_ENTRY) {
     uninit_player(INITED_ALL-(INITED_GUI+INITED_LIRC));
     eof = 1;




More information about the MPlayer-cvslog mailing list