mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
mplayer: do not cancel playback if VF/VO config fails
Usually failing to initialize the video chain does not stop playback, and continues with audio-only. But when VF/VO config failed (the second step in initializing them), playback was canceled and advanced to the next file. Make it more consistent and just switch off video if it fails. Also, if no audio track is selected, go to next file anyway. The player core goes into some sort of idle mode if no video and audio track is selected, and we don't want to trigger it here. (It's unclear whether that is a bug or feature: it's meant to work around some corner cases, but maybe it shouldn't be triggered when switching off video & audio tracks in normal playback.)
This commit is contained in:
parent
cde59e913f
commit
9194c81070
@ -3078,8 +3078,12 @@ static void run_playloop(struct MPContext *mpctx)
|
||||
mp_tmsg(MSGT_CPLAYER, MSGL_FATAL,
|
||||
"\nFATAL: Could not initialize video filters (-vf) "
|
||||
"or video output (-vo).\n");
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
return;
|
||||
uninit_player(mpctx, INITIALIZED_VCODEC | INITIALIZED_VO);
|
||||
cleanup_demux_stream(mpctx, STREAM_VIDEO);
|
||||
mpctx->current_track[STREAM_VIDEO] = NULL;
|
||||
if (!mpctx->current_track[STREAM_AUDIO])
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
break;
|
||||
}
|
||||
video_left = frame_time >= 0;
|
||||
if (video_left && !mpctx->restart_playback) {
|
||||
|
Loading…
Reference in New Issue
Block a user