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:
wm4 2015-06-11 21:30:02 +02:00
parent ce513dedd8
commit 87b60ded88
1 changed files with 2 additions and 2 deletions

View File

@ -1302,8 +1302,8 @@ terminate_playback:
{
if (mpctx->error_playing >= 0 && nothing_played)
mpctx->error_playing = MPV_ERROR_NOTHING_TO_PLAY;
end_event.error = mpctx->error_playing;
if (end_event.error < 0) {
if (mpctx->error_playing < 0) {
end_event.error = mpctx->error_playing;
end_event.reason = MPV_END_FILE_REASON_ERROR;
} else {
end_event.reason = MPV_END_FILE_REASON_EOF;