player: don't print audio/video init failure message twice

The messages "Audio: no audio" and "Video: no video" could be printed
twice each if initializing them failed. Prevent his silliness.

CC: @mpv-player/stable
This commit is contained in:
wm4 2014-10-02 03:12:45 +02:00
parent ae2e2b9740
commit f62f984404
2 changed files with 4 additions and 3 deletions

View File

@ -263,7 +263,8 @@ init_error:
uninit_player(mpctx, INITIALIZED_ACODEC | INITIALIZED_AO);
no_audio:
mp_deselect_track(mpctx, track);
MP_INFO(mpctx, "Audio: no audio\n");
if (track)
MP_INFO(mpctx, "Audio: no audio\n");
}
// Return pts value corresponding to the end point of audio written to the

View File

@ -308,9 +308,9 @@ int reinit_video_chain(struct MPContext *mpctx)
err_out:
no_video:
uninit_player(mpctx, INITIALIZED_VCODEC | (opts->force_vo ? 0 : INITIALIZED_VO));
mp_deselect_track(mpctx, track);
if (track)
mp_deselect_track(mpctx, track);
handle_force_window(mpctx, true);
MP_INFO(mpctx, "Video: no video\n");
return 0;
}