diff options
author | wm4 <wm4@nowhere> | 2014-10-02 03:12:45 +0200 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-10-11 13:53:27 +0200 |
commit | a2e38ca65708c4c970a958e60d1d0e0e691fade9 (patch) | |
tree | e81e3a24206ceeb4094042172dbdd0f731ab82d3 | |
parent | 3e410f423d47446b8227a79c5ceeebc9745c2517 (diff) | |
download | mpv-a2e38ca65708c4c970a958e60d1d0e0e691fade9.tar.bz2 mpv-a2e38ca65708c4c970a958e60d1d0e0e691fade9.tar.xz |
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
-rw-r--r-- | player/audio.c | 3 | ||||
-rw-r--r-- | player/video.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/player/audio.c b/player/audio.c index cc4496ed57..c9ea462f81 100644 --- a/player/audio.c +++ b/player/audio.c @@ -215,7 +215,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 diff --git a/player/video.c b/player/video.c index 3d308ae955..80acbf7b72 100644 --- a/player/video.c +++ b/player/video.c @@ -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; } |