mirror of
https://github.com/mpv-player/mpv
synced 2025-03-22 11:18:32 +00:00
Get rid of 2 osd related hacks.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17939 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
57f1881677
commit
64b3deff24
23
mplayer.c
23
mplayer.c
@ -346,7 +346,6 @@ int global_sub_pos = -1; // this encompasses all subtitle sources
|
|||||||
#define SUB_SOURCE_DEMUX 2
|
#define SUB_SOURCE_DEMUX 2
|
||||||
#define SUB_SOURCES 3
|
#define SUB_SOURCES 3
|
||||||
int global_sub_indices[SUB_SOURCES];
|
int global_sub_indices[SUB_SOURCES];
|
||||||
int global_sub_quiet_osd_hack = 0;
|
|
||||||
|
|
||||||
extern int mp_msg_levels[MSGT_MAX];
|
extern int mp_msg_levels[MSGT_MAX];
|
||||||
extern int mp_msg_level_all;
|
extern int mp_msg_level_all;
|
||||||
@ -1138,6 +1137,21 @@ static void rm_osd_msg(int id) {
|
|||||||
free(msg);
|
free(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \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
|
* \brief Get the current message fron the OSD stack
|
||||||
*
|
*
|
||||||
@ -2546,7 +2560,6 @@ play_next_file:
|
|||||||
// init global sub numbers
|
// init global sub numbers
|
||||||
global_sub_size = 0;
|
global_sub_size = 0;
|
||||||
{ int i; for (i = 0; i < SUB_SOURCES; i++) global_sub_indices[i] = -1; }
|
{ 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);
|
if (filename) load_per_file_config (mconfig, filename);
|
||||||
|
|
||||||
@ -3292,7 +3305,6 @@ fflush(stdout);
|
|||||||
float time_frame=0; // Timer
|
float time_frame=0; // Timer
|
||||||
//float num_frames=0; // number of frames played
|
//float num_frames=0; // number of frames played
|
||||||
int grab_frames=0;
|
int grab_frames=0;
|
||||||
char osd_text_buffer[64];
|
|
||||||
int drop_frame=0; // current dropping status
|
int drop_frame=0; // current dropping status
|
||||||
int dropped_frames=0; // how many frames dropped since last non-dropped frame
|
int dropped_frames=0; // how many frames dropped since last non-dropped frame
|
||||||
int too_slow_frame_cnt=0;
|
int too_slow_frame_cnt=0;
|
||||||
@ -3308,11 +3320,10 @@ int frame_time_remaining=0; // flag
|
|||||||
int blit_frame=0;
|
int blit_frame=0;
|
||||||
int was_paused=0;
|
int was_paused=0;
|
||||||
|
|
||||||
osd_text_buffer[0]=0;
|
|
||||||
// make sure OSD old does not stay around,
|
// make sure OSD old does not stay around,
|
||||||
// e.g. with -fixed-vo and same-resolution files
|
// e.g. with -fixed-vo and same-resolution files
|
||||||
vo_osd_text = osd_text_buffer;
|
clear_osd_msgs();
|
||||||
vo_osd_changed(OSDTYPE_OSD);
|
update_osd_msg();
|
||||||
|
|
||||||
//================ SETUP AUDIO ==========================
|
//================ SETUP AUDIO ==========================
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user