[MPlayer-cvslog] CVS: main mplayer.c,1.922,1.923

Alban Bedel CVS syncmail at mplayerhq.hu
Fri Mar 24 21:42:26 CET 2006


CVS change done by Alban Bedel CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv22691

Modified Files:
	mplayer.c 
Log Message:
Get rid of 2 osd related hacks.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.922
retrieving revision 1.923
diff -u -r1.922 -r1.923
--- mplayer.c	24 Mar 2006 19:32:21 -0000	1.922
+++ mplayer.c	24 Mar 2006 20:42:23 -0000	1.923
@@ -346,7 +346,6 @@
 #define SUB_SOURCE_DEMUX 2
 #define SUB_SOURCES 3
 int global_sub_indices[SUB_SOURCES];
-int global_sub_quiet_osd_hack = 0;
 
 extern int mp_msg_levels[MSGT_MAX];
 extern int mp_msg_level_all;
@@ -1139,6 +1138,21 @@
 }
 
 /**
+ *  \brief Remove all messages from the OSD stack
+ * 
+ */
+
+static void clear_osd_msgs(void) {
+    mp_osd_msg_t* msg = osd_msg_stack, *prev = NULL;
+    while(msg) {
+        prev = msg->prev;
+        free(msg);
+        msg = prev;
+    }
+    osd_msg_stack = NULL;
+}
+
+/**
  *  \brief Get the current message fron the OSD stack
  * 
  *  This function decrement the message timer and destroy the old ones.
@@ -2546,7 +2560,6 @@
   // init global sub numbers
   global_sub_size = 0;
   { int i; for (i = 0; i < SUB_SOURCES; i++) global_sub_indices[i] = -1; }
-  global_sub_quiet_osd_hack = 1;
 
   if (filename) load_per_file_config (mconfig, filename);
 
@@ -3292,7 +3305,6 @@
 float time_frame=0; // Timer
 //float num_frames=0;      // number of frames played
 int grab_frames=0;
-char osd_text_buffer[64];
 int drop_frame=0;     // current dropping status
 int dropped_frames=0; // how many frames dropped since last non-dropped frame
 int too_slow_frame_cnt=0;
@@ -3308,11 +3320,10 @@
 int blit_frame=0;
 int was_paused=0;
 
-osd_text_buffer[0]=0;
 // make sure OSD old does not stay around,
 // e.g. with -fixed-vo and same-resolution files
-vo_osd_text = osd_text_buffer;
-vo_osd_changed(OSDTYPE_OSD);
+clear_osd_msgs();
+update_osd_msg();
 
 //================ SETUP AUDIO ==========================
 




More information about the MPlayer-cvslog mailing list