From c9234d769df83b7280f68f9dc24445029f84041a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Oct 2014 18:31:43 +0200 Subject: player: fix exiting if both audio and video fail initializing The player was supposed to exit playback if both video and audio failed to initialize (or if one of the streams was not selected when the other stream failed). This didn't work; for one this check was missing from one of the failure paths. And more importantly, both checked the current_track array incorrectly. Fix these issues, and move the failure handling code into a common function. CC: @mpv-player/stable --- player/audio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'player/audio.c') diff --git a/player/audio.c b/player/audio.c index 5078e04dee..6774d415c3 100644 --- a/player/audio.c +++ b/player/audio.c @@ -285,11 +285,8 @@ init_error: uninit_audio_chain(mpctx); uninit_audio_out(mpctx); no_audio: - mp_deselect_track(mpctx, track); if (track) - MP_INFO(mpctx, "Audio: no audio\n"); - if (!mpctx->current_track[STREAM_VIDEO]) - mpctx->stop_play = PT_NEXT_ENTRY; + error_on_track(mpctx, track); } // Return pts value corresponding to the end point of audio written to the -- cgit v1.2.3