diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 09:14:06 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-30 13:24:56 +0300 |
commit | 66db9ec7d6a9f869dc922ad9a9b8a5d278577bab (patch) | |
tree | 7a8e265871b095ca366b794f94d89c75765ee07b /mplayer.c | |
parent | 7b085d4514d091945492cb00fa5a98bbd1bc7cf8 (diff) | |
download | mpv-66db9ec7d6a9f869dc922ad9a9b8a5d278577bab.tar.bz2 mpv-66db9ec7d6a9f869dc922ad9a9b8a5d278577bab.tar.xz |
Remove INITIALIZED_INPUT from mpctx->initialized_flags
The input functions are never uninited except at exit. Move the uninit
to player exit function and remove the flag.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -644,16 +644,6 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){ } #endif - if(mask&INITIALIZED_INPUT){ - mpctx->initialized_flags&=~INITIALIZED_INPUT; - current_module="uninit_input"; - mp_input_uninit(mpctx->input); -#ifdef HAVE_MENU - if (use_menu) - menu_uninit(); -#endif - } - current_module=NULL; } @@ -668,6 +658,13 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){ vo_uninit(mpctx->x11_state); // Close the X11 connection (if any is open). #endif + current_module="uninit_input"; + mp_input_uninit(mpctx->input); +#ifdef HAVE_MENU + if (use_menu) + menu_uninit(); +#endif + #ifdef HAVE_FREETYPE current_module="uninit_font"; if (sub_font && sub_font != vo_font) free_font_desc(sub_font); @@ -2904,7 +2901,6 @@ stream_set_interrupt_callback(mp_input_check_interrupt, mpctx->input); } #endif -mpctx->initialized_flags|=INITIALIZED_INPUT; current_module = NULL; /// Catch signals @@ -3944,7 +3940,7 @@ mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d \n",mpctx->eof); if(mpctx->dvbin_reopen) { mpctx->eof = 0; - uninit_player(mpctx, INITIALIZED_ALL-(INITIALIZED_GUI|INITIALIZED_STREAM|INITIALIZED_INPUT|INITIALIZED_GETCH2|(opts->fixed_vo?INITIALIZED_VO:0))); + uninit_player(mpctx, INITIALIZED_ALL-(INITIALIZED_GUI|INITIALIZED_STREAM|INITIALIZED_GETCH2|(opts->fixed_vo?INITIALIZED_VO:0))); cache_uninit(mpctx->stream); mpctx->dvbin_reopen = 0; goto goto_enable_cache; @@ -3982,7 +3978,7 @@ if(benchmark){ } // time to uninit all, except global stuff: -uninit_player(mpctx, INITIALIZED_ALL-(INITIALIZED_GUI+INITIALIZED_INPUT+(opts->fixed_vo?INITIALIZED_VO:0))); +uninit_player(mpctx, INITIALIZED_ALL-(INITIALIZED_GUI+(opts->fixed_vo?INITIALIZED_VO:0))); if(mpctx->set_of_sub_size > 0) { current_module="sub_free"; |