[MPlayer-dev-eng] [PATCH 1/5] Remove some useless static zero initializations.
Clément Bœsch
ubitux at gmail.com
Sat Apr 16 00:02:49 CEST 2011
---
mplayer.c | 48 ++++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/mplayer.c b/mplayer.c
index c946b4a..501e2d4 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -162,7 +162,7 @@ static int cfg_include(m_option_t *conf, char *filename){
return m_config_parse_config_file(mconfig, filename);
}
-static int max_framesize=0;
+static int max_framesize;
int noconsolecontrols=0;
//**************************************************************************//
@@ -188,16 +188,16 @@ int fixed_vo=0;
// benchmark:
double video_time_usage=0;
double vout_time_usage=0;
-static double audio_time_usage=0;
-static int total_time_usage_start=0;
-static int total_frame_cnt=0;
-static int drop_frame_cnt=0; // total number of dropped frames
+static double audio_time_usage;
+static int total_time_usage_start;
+static int total_frame_cnt;
+static int drop_frame_cnt; // total number of dropped frames
int benchmark=0;
// options:
#define DEFAULT_STARTUP_DECODE_RETRY 8
int auto_quality=0;
-static int output_quality=0;
+static int output_quality;
float playback_speed=1.0;
@@ -207,7 +207,7 @@ int use_gui=0;
int enqueue=0;
#endif
-static int list_properties = 0;
+static int list_properties;
int osd_level=1;
// if nonzero, hide current OSD contents when GetTimerMS() reaches this
@@ -218,12 +218,12 @@ int osd_fractions = 0; // determines how fractions of seconds are displayed
int term_osd = 1;
static char* term_osd_esc = "\x1b[A\r\x1b[K";
-static char* playing_msg = NULL;
+static char* playing_msg;
// seek:
static double seek_to_sec;
-static off_t seek_to_byte=0;
-static off_t step_sec=0;
-static int loop_seek=0;
+static off_t seek_to_byte;
+static off_t step_sec;
+static int loop_seek;
static m_time_size_t end_at = { .type = END_AT_NONE, .pos = 0 };
@@ -251,7 +251,7 @@ int dvdsub_lang_id;
int vobsub_id=-1;
char* audio_lang=NULL;
char* dvdsub_lang=NULL;
-static char* spudec_ifo=NULL;
+static char* spudec_ifo;
char* filename=NULL; //"MI2-Trailer.avi";
int forced_subs_only=0;
int file_filter=1;
@@ -271,14 +271,14 @@ int capture_dump = 0;
// A-V sync:
static float default_max_pts_correction=-1;
static float max_pts_correction=0;//default_max_pts_correction;
-static float c_total=0;
+static float c_total;
float audio_delay=0;
-static int ignore_start=0;
+static int ignore_start;
-static int softsleep=0;
+static int softsleep;
double force_fps=0;
-static int force_srate=0;
+static int force_srate;
static int audio_output_format=-1; // AF_FORMAT_UNKNOWN
int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode
static int play_n_frames=-1;
@@ -309,9 +309,9 @@ static const vf_info_t* const libmenu_vfs[] = {
&vf_info_menu,
NULL
};
-static vf_instance_t* vf_menu = NULL;
+static vf_instance_t* vf_menu;
int use_menu = 0;
-static char* menu_cfg = NULL;
+static char* menu_cfg;
static char* menu_root = "main";
#endif
@@ -337,14 +337,14 @@ int edl_start_pts = 0; ///< Automatically add/sub this from EDL start/stop pos
int use_filedir_conf;
int use_filename_title;
-static unsigned int initialized_flags=0;
+static unsigned int initialized_flags;
/// step size of mixer changes
int volstep = 3;
#ifdef CONFIG_CRASH_DEBUG
static char *prog_path;
-static int crash_debug = 0;
+static int crash_debug;
#endif
/* This header requires all the global variable declarations. */
@@ -759,7 +759,7 @@ static void child_sighandler(int x){
#endif
static void exit_sighandler(int x){
- static int sig_count=0;
+ static int sig_count;
#ifdef CONFIG_CRASH_DEBUG
if (!crash_debug || x != SIGTRAP)
#endif
@@ -1351,7 +1351,7 @@ struct mp_osd_msg {
};
/// OSD message stack.
-static mp_osd_msg_t* osd_msg_stack = NULL;
+static mp_osd_msg_t* osd_msg_stack;
/**
* \brief Add a message on the OSD message stack
@@ -1439,7 +1439,7 @@ static void clear_osd_msgs(void) {
static mp_osd_msg_t* get_osd_msg(void) {
mp_osd_msg_t *msg,*prev,*last = NULL;
- static unsigned last_update = 0;
+ static unsigned last_update;
unsigned now = GetTimerMS();
unsigned diff;
char hidden_dec_done = 0;
@@ -2039,7 +2039,7 @@ static void adjust_sync_and_print_status(int between_frames, float timing_error)
v_pts = mpctx->sh_video->pts;
{
- static int drop_message=0;
+ static int drop_message;
double AV_delay = a_pts - audio_delay - v_pts;
double x;
// not a good idea to do A-V correction with with bogus values
--
1.7.4.4
More information about the MPlayer-dev-eng
mailing list