diff options
author | wm4 <wm4@nowhere> | 2014-04-11 01:23:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-11 01:23:32 +0200 |
commit | 86094c2c5ae634b9ff02a85e51c33955b31babfa (patch) | |
tree | d7e99e5394d917f031e56d6a8e91c827f41d8475 /player/client.c | |
parent | d3e9f51c71a1691b76ee0918d228c5fe987e4ffa (diff) | |
download | mpv-86094c2c5ae634b9ff02a85e51c33955b31babfa.tar.bz2 mpv-86094c2c5ae634b9ff02a85e51c33955b31babfa.tar.xz |
client API: include the reason in MPV_EVENT_END_FILE
Otherwise, the client API user could not know why playback was stopped.
Regarding the fact that 0 is used both for normal EOF and EOF on error:
this is because mplayer traditionally did not distinguish these, and in
general it's hard to tell the real reason. (There are various weird
corner cases which make it hard.)
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c index 2347f19fbd..642937421d 100644 --- a/player/client.c +++ b/player/client.c @@ -393,6 +393,9 @@ static void dup_event_data(struct mpv_event *ev) ev->data = msg; break; } + case MPV_EVENT_END_FILE: + ev->data = talloc_memdup(NULL, ev->data, sizeof(mpv_event_end_file)); + break; default: // Doesn't use events with memory allocation. if (ev->data) |