# HG changeset patch # User diego # Date 1277399989 0 # Node ID dc26022e9c27306551b9b1f4c2e4b72fd5c6a622 # Parent 4b738166e8250fa0bcf82b8561d78ab9b70389d2 Clean up sub-related extern declarations. - Move sub_delay and sub_fps declarations to mpcommon.h. - Remove redundant ass_track extern declaration. - Add #include for sub_utf8 extern declaration. diff -r 4b738166e825 -r dc26022e9c27 find_sub.c --- a/find_sub.c Thu Jun 24 16:50:47 2010 +0000 +++ b/find_sub.c Thu Jun 24 17:19:49 2010 +0000 @@ -37,8 +37,6 @@ static int nosub_range_end=-1; static const sub_data *last_sub_data = NULL; -extern float sub_delay; -extern float sub_fps; void step_sub(sub_data *subd, float pts, int movement) { subtitle *subs; diff -r 4b738166e825 -r dc26022e9c27 gui/mplayer/gtk/fs.c --- a/gui/mplayer/gtk/fs.c Thu Jun 24 16:50:47 2010 +0000 +++ b/gui/mplayer/gtk/fs.c Thu Jun 24 17:19:49 2010 +0000 @@ -33,6 +33,7 @@ #include "gui/app.h" #include "gui/interface.h" #include "help_mp.h" +#include "mpcommon.h" #include "stream/stream.h" #include "gui/mplayer/widgets.h" diff -r 4b738166e825 -r dc26022e9c27 gui/mplayer/gtk/opts.c --- a/gui/mplayer/gtk/opts.c Thu Jun 24 16:50:47 2010 +0000 +++ b/gui/mplayer/gtk/opts.c Thu Jun 24 17:19:49 2010 +0000 @@ -28,6 +28,7 @@ #include "config.h" #include "help_mp.h" #include "mixer.h" +#include "mpcommon.h" #include "libao2/audio_out.h" #include "libvo/sub.h" #include "libvo/video_out.h" diff -r 4b738166e825 -r dc26022e9c27 libmpcodecs/vf_ass.c --- a/libmpcodecs/vf_ass.c Thu Jun 24 16:50:47 2010 +0000 +++ b/libmpcodecs/vf_ass.c Thu Jun 24 17:19:49 2010 +0000 @@ -31,7 +31,7 @@ #include "config.h" #include "mp_msg.h" #include "help_mp.h" - +#include "mpcommon.h" #include "img_format.h" #include "mp_image.h" #include "vd.h" @@ -68,8 +68,6 @@ unsigned char* dirty_rows; } vf_priv_dflt; -extern ass_track_t* ass_track; -extern float sub_delay; static int config(struct vf_instance *vf, int width, int height, int d_width, int d_height, diff -r 4b738166e825 -r dc26022e9c27 libmpcodecs/vf_vo.c --- a/libmpcodecs/vf_vo.c Thu Jun 24 16:50:47 2010 +0000 +++ b/libmpcodecs/vf_vo.c Thu Jun 24 17:19:49 2010 +0000 @@ -22,7 +22,7 @@ #include "config.h" #include "mp_msg.h" - +#include "mpcommon.h" #include "mp_image.h" #include "vf.h" @@ -31,13 +31,10 @@ #ifdef CONFIG_ASS #include "libass/ass_mp.h" -extern ass_track_t* ass_track; #endif //===========================================================================// -extern float sub_delay; - struct vf_priv_s { double pts; const vo_functions_t *vo; diff -r 4b738166e825 -r dc26022e9c27 mpcommon.h --- a/mpcommon.h Thu Jun 24 16:50:47 2010 +0000 +++ b/mpcommon.h Thu Jun 24 17:19:49 2010 +0000 @@ -29,6 +29,9 @@ extern ass_track_t *ass_track; extern subtitle *vo_sub_last; +extern float sub_delay; +extern float sub_fps; + extern const m_option_t noconfig_opts[]; void print_version(const char* name); diff -r 4b738166e825 -r dc26022e9c27 mplayer.h --- a/mplayer.h Thu Jun 24 16:50:47 2010 +0000 +++ b/mplayer.h Thu Jun 24 17:19:49 2010 +0000 @@ -38,8 +38,6 @@ extern double force_fps; //extern char **sub_name; -extern float sub_delay; -extern float sub_fps; extern int sub_auto; extern char * filename; diff -r 4b738166e825 -r dc26022e9c27 subreader.c --- a/subreader.c Thu Jun 24 16:50:47 2010 +0000 +++ b/subreader.c Thu Jun 24 17:19:49 2010 +0000 @@ -31,7 +31,9 @@ #include "config.h" #include "mp_msg.h" +#include "mpcommon.h" #include "subreader.h" +#include "libvo/sub.h" #include "stream/stream.h" #include "libavutil/common.h" #include "libavutil/avstring.h" @@ -1085,12 +1087,8 @@ return SUB_INVALID; // too many bad lines } -extern int sub_utf8; int sub_utf8_prev=0; -extern float sub_delay; -extern float sub_fps; - #ifdef CONFIG_ICONV static iconv_t icdsc = (iconv_t)(-1);