From 87b60ded88f2cfb54636f88324a715a943f14fb9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 11 Jun 2015 21:30:02 +0200 Subject: 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. --- player/loadfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player') diff --git a/player/loadfile.c b/player/loadfile.c index 46aa999d76..93ebd73df6 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -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; -- cgit v1.2.3