mirror of https://github.com/mpv-player/mpv
client API: leave mpv_event_end_file.error to 0 on no error
Making sure this is true makes it closer to the libmpv docs, and possibly less confusing in corner cases.
This commit is contained in:
parent
ce513dedd8
commit
87b60ded88
|
@ -1302,8 +1302,8 @@ terminate_playback:
|
||||||
{
|
{
|
||||||
if (mpctx->error_playing >= 0 && nothing_played)
|
if (mpctx->error_playing >= 0 && nothing_played)
|
||||||
mpctx->error_playing = MPV_ERROR_NOTHING_TO_PLAY;
|
mpctx->error_playing = MPV_ERROR_NOTHING_TO_PLAY;
|
||||||
|
if (mpctx->error_playing < 0) {
|
||||||
end_event.error = mpctx->error_playing;
|
end_event.error = mpctx->error_playing;
|
||||||
if (end_event.error < 0) {
|
|
||||||
end_event.reason = MPV_END_FILE_REASON_ERROR;
|
end_event.reason = MPV_END_FILE_REASON_ERROR;
|
||||||
} else {
|
} else {
|
||||||
end_event.reason = MPV_END_FILE_REASON_EOF;
|
end_event.reason = MPV_END_FILE_REASON_EOF;
|
||||||
|
|
Loading…
Reference in New Issue