summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/lua.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/player/lua.c b/player/lua.c
index 76a0d69e52..58f8396d17 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -504,17 +504,10 @@ static int script_wait_event(lua_State *L)
mpv_event *event = mpv_wait_event(ctx->client, luaL_optnumber(L, 1, 1e20));
- lua_newtable(L); // event
-
struct mpv_node rn;
mpv_event_to_node(&rn, event);
- assert(rn.format == MPV_FORMAT_NODE_MAP);
- mpv_node_list *list = rn.u.list;
- for (int n = 0; n < list->num; n++) {
- pushnode(L, &list->values[n]);
- lua_setfield(L, -2, list->keys[n]);
- }
+ pushnode(L, &rn); // event
mpv_free_node_contents(&rn);