mirror of https://github.com/mpv-player/mpv
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:
parent
ae2e2b9740
commit
f62f984404
|
@ -263,7 +263,8 @@ init_error:
|
||||||
uninit_player(mpctx, INITIALIZED_ACODEC | INITIALIZED_AO);
|
uninit_player(mpctx, INITIALIZED_ACODEC | INITIALIZED_AO);
|
||||||
no_audio:
|
no_audio:
|
||||||
mp_deselect_track(mpctx, track);
|
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
|
// Return pts value corresponding to the end point of audio written to the
|
||||||
|
|
|
@ -308,9 +308,9 @@ int reinit_video_chain(struct MPContext *mpctx)
|
||||||
err_out:
|
err_out:
|
||||||
no_video:
|
no_video:
|
||||||
uninit_player(mpctx, INITIALIZED_VCODEC | (opts->force_vo ? 0 : INITIALIZED_VO));
|
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);
|
handle_force_window(mpctx, true);
|
||||||
MP_INFO(mpctx, "Video: no video\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue