mirror of https://github.com/mpv-player/mpv
player: actually report an exit error if encoding mode fails on closing
The code that determines the process exit code ignores all stop_play values other than PT_QUIT. Generally, PT_ERROR is meaningless outside of play_current_file(), and is mostly equivalent to PT_NEXT_ENTRY. Do something that makes it report a non-0 exit code, and indicates in the terminal exit message that something went wrong. Untested.
This commit is contained in:
parent
33519d61aa
commit
a5af126f91
|
@ -1809,7 +1809,7 @@ void mp_play_files(struct MPContext *mpctx)
|
|||
uninit_video_out(mpctx);
|
||||
|
||||
if (!encode_lavc_free(mpctx->encode_lavc_ctx))
|
||||
mpctx->stop_play = PT_ERROR;
|
||||
mpctx->files_errored += 1;
|
||||
|
||||
mpctx->encode_lavc_ctx = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue