summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-10 14:35:07 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commitb0a04b8dea84bb3500330bd6ed53d2054c9cc6dd (patch)
tree596d573d73c5869f1aa18630c8330380d6e0dd07 /player
parentf0678afba010cfd13418641036309b3724cb9f66 (diff)
downloadmpv-b0a04b8dea84bb3500330bd6ed53d2054c9cc6dd.tar.bz2
mpv-b0a04b8dea84bb3500330bd6ed53d2054c9cc6dd.tar.xz
client API: merge status_reply() helper with only remaining caller
All other callers had to be changed, so there's no point in keeping this helper function around. It's just another unnecessary indirection.
Diffstat (limited to 'player')
-rw-r--r--player/client.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/player/client.c b/player/client.c
index e26ebbd5d9..b6282a1134 100644
--- a/player/client.c
+++ b/player/client.c
@@ -684,16 +684,6 @@ static void send_reply(struct mpv_handle *ctx, uint64_t userdata,
pthread_mutex_unlock(&ctx->lock);
}
-static void status_reply(struct mpv_handle *ctx, int event,
- uint64_t userdata, int status)
-{
- struct mpv_event reply = {
- .event_id = event,
- .error = status,
- };
- send_reply(ctx, userdata, &reply);
-}
-
// Return whether there's any client listening to this event.
// If false is returned, the core doesn't need to send it.
bool mp_client_event_is_registered(struct MPContext *mpctx, int event)
@@ -1217,8 +1207,11 @@ static void setproperty_fn(void *arg)
req->status = translate_property_error(err);
if (req->reply_ctx) {
- status_reply(req->reply_ctx, MPV_EVENT_SET_PROPERTY_REPLY,
- req->userdata, req->status);
+ struct mpv_event reply = {
+ .event_id = MPV_EVENT_SET_PROPERTY_REPLY,
+ .error = req->status,
+ };
+ send_reply(req->reply_ctx, req->userdata, &reply);
talloc_free(req);
}
}