summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-11 21:30:02 +0200
committerwm4 <wm4@nowhere>2015-06-11 21:42:09 +0200
commit87b60ded88f2cfb54636f88324a715a943f14fb9 (patch)
tree3deafc9e2f77f0e5e33be8e86b29aa8a1d19ac59 /player/loadfile.c
parentce513dedd8b61509d58aa3d76551e1aad36573f2 (diff)
downloadmpv-87b60ded88f2cfb54636f88324a715a943f14fb9.tar.bz2
mpv-87b60ded88f2cfb54636f88324a715a943f14fb9.tar.xz
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.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c4
1 files changed, 2 insertions, 2 deletions
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;