diff options
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 58 |
1 files changed, 27 insertions, 31 deletions
@@ -161,7 +161,7 @@ static int max_framesize = 0; #include "defaultopts.h" static const char help_text[] = _( -"Usage: mplayer [options] [url|path/]filename\n" +"Usage: mpv [options] [url|path/]filename\n" "\n" "Basic options: (complete list in the man page)\n" " --ss=<position> seek to given (seconds or hh:mm:ss) position\n" @@ -186,7 +186,7 @@ static const char av_desync_help_text[] = _( " If you have PulseAudio, try --ao=alsa .\n" "- Slow video output.\n" " Try a different -vo driver (-vo help for a list) or try -framedrop!\n" -"- Playing a video file with --vo=gl/gl3 with higher FPS than your monitor.\n" +"- Playing a video file with --vo=opengl with higher FPS than the monitor.\n" " This is due to vsync limiting the framerate. Try --no-vsync, or a\n" " different VO.\n" "- Playing from a slow network source.\n" @@ -566,10 +566,10 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask) if (mask & INITIALIZED_AO) { mpctx->initialized_flags &= ~INITIALIZED_AO; - if (mpctx->ao) { + if (mpctx->mixer.ao) mixer_uninit(&mpctx->mixer); + if (mpctx->ao) ao_uninit(mpctx->ao, mpctx->stop_play != AT_END_OF_FILE); - } mpctx->ao = NULL; mpctx->mixer.ao = NULL; } @@ -646,7 +646,7 @@ static bool parse_cfgfiles(struct MPContext *mpctx, m_config_t *conf) char *conffile; int conffile_fd; if (!(opts->noconfig & 2) && - m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0) + m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mpv.conf") < 0) return false; if ((conffile = get_path("")) == NULL) mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "Cannot find HOME directory.\n"); @@ -765,7 +765,7 @@ static void load_per_file_config(m_config_t *conf, const char * const file) if (use_filedir_conf) { char dircfg[MP_PATH_MAX]; strcpy(dircfg, cfg); - strcpy(dircfg + (name - cfg), "mplayer.conf"); + strcpy(dircfg + (name - cfg), "mpv.conf"); try_load_config(conf, dircfg); if (try_load_config(conf, cfg)) @@ -793,22 +793,18 @@ static void load_per_file_options(m_config_t *conf, * The function returns whether it was interrupted. */ static bool libmpdemux_was_interrupted(struct MPContext *mpctx) { - // Basically, give queued up user commands a chance to run, if the normal - // play loop (which does run_command()) hasn't been executed for a while. - mp_cmd_t *cmd = mp_input_get_cmd(mpctx->input, 0, 0); - if (cmd) { - // Only run "safe" commands. Consider the case someone queues up a - // command to load a file, and immediately after that to select a - // subtitle stream. This function can be called between opening the - // file and opening the demuxer. We don't want the subtitle command to - // be lost. - if (mp_input_is_abort_cmd(cmd->id)) { + for (;;) { + if (mpctx->stop_play != KEEP_PLAYING + && mpctx->stop_play != AT_END_OF_FILE) + return true; + mp_cmd_t *cmd = mp_input_get_cmd(mpctx->input, 0, 0); + if (!cmd) + break; + if (mp_input_is_abort_cmd(cmd->id)) run_command(mpctx, cmd); - mp_cmd_free(cmd); - } + mp_cmd_free(cmd); } - return mpctx->stop_play != KEEP_PLAYING - || mpctx->stop_play != AT_END_OF_FILE; + return false; } static int find_new_tid(struct MPContext *mpctx, enum stream_type t) @@ -3775,7 +3771,7 @@ static void play_current_file(struct MPContext *mpctx) if (mpctx->file_format == DEMUXER_TYPE_PLAYLIST) { mp_msg(MSGT_CPLAYER, MSGL_ERR, "\nThis looks like a playlist, but " "playlist support will not be used automatically.\n" - "MPlayer's playlist code is unsafe and should only be used with " + "mpv's playlist code is unsafe and should only be used with " "trusted sources.\nPlayback will probably fail.\n\n"); #if 0 // Handle playlist @@ -3873,6 +3869,13 @@ goto_enable_cache: preselect_demux_streams(mpctx); +#ifdef CONFIG_ENCODING + if (mpctx->encode_lavc_ctx && mpctx->current_track[STREAM_VIDEO]) + encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_VIDEO); + if (mpctx->encode_lavc_ctx && mpctx->current_track[STREAM_AUDIO]) + encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_AUDIO); +#endif + reinit_video_chain(mpctx); reinit_audio_chain(mpctx); reinit_subs(mpctx); @@ -3900,13 +3903,6 @@ goto_enable_cache: goto terminate_playback; } -#ifdef CONFIG_ENCODING - if (mpctx->encode_lavc_ctx && mpctx->sh_video) - encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_VIDEO); - if (mpctx->encode_lavc_ctx && mpctx->sh_audio) - encode_lavc_expect_stream(mpctx->encode_lavc_ctx, AVMEDIA_TYPE_AUDIO); -#endif - if (opts->playing_msg) { char *msg = mp_property_expand_string(mpctx, opts->playing_msg); mp_msg(MSGT_CPLAYER, MSGL_INFO, "%s", msg); @@ -3991,7 +3987,7 @@ goto_enable_cache: if (end_at.type == END_AT_SIZE) { mp_tmsg(MSGT_CPLAYER, MSGL_WARN, - "Option -endpos in MPlayer does not yet support size units.\n"); + "Option -endpos in mpv does not yet support size units.\n"); end_at.type = END_AT_NONE; } @@ -4088,7 +4084,7 @@ static void play_files(struct MPContext *mpctx) static void print_version(int always) { mp_msg(MSGT_CPLAYER, always ? MSGL_INFO : MSGL_V, - "%s (C) 2000-2012\n", mplayer_version); + "%s (C) 2000-2012 mpv/MPlayer/mplayer2 projects\n", mplayer_version); } static bool handle_help_options(struct MPContext *mpctx) @@ -4187,7 +4183,7 @@ static void detach_ptw32(void) static void osdep_preinit(int *p_argc, char ***p_argv) { - char *enable_talloc = getenv("MPLAYER_LEAK_REPORT"); + char *enable_talloc = getenv("MPV_LEAK_REPORT"); if (*p_argc > 1 && (strcmp((*p_argv)[1], "-leak-report") == 0 || strcmp((*p_argv)[1], "--leak-report") == 0)) enable_talloc = "1"; |