mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 12:55:16 +00:00
all: replace mpv_detach_destroy() with mpv_destroy()
This commit is contained in:
parent
4d9c6ab6b9
commit
03791fae16
@ -209,7 +209,7 @@ done:
|
||||
talloc_free(client_msg.start);
|
||||
if (arg->close_client_fd)
|
||||
close(arg->client_fd);
|
||||
mpv_detach_destroy(arg->client);
|
||||
mpv_destroy(arg->client);
|
||||
talloc_free(arg);
|
||||
return NULL;
|
||||
}
|
||||
@ -230,7 +230,7 @@ static void ipc_start_client(struct mp_ipc_ctx *ctx, struct client_arg *client)
|
||||
|
||||
err:
|
||||
if (client->client)
|
||||
mpv_detach_destroy(client->client);
|
||||
mpv_destroy(client->client);
|
||||
|
||||
if (client->close_client_fd)
|
||||
close(client->client_fd);
|
||||
|
@ -304,7 +304,7 @@ done:
|
||||
CloseHandle(arg->write_ol.hEvent);
|
||||
|
||||
CloseHandle(arg->client_h);
|
||||
mpv_detach_destroy(arg->client);
|
||||
mpv_destroy(arg->client);
|
||||
talloc_free(arg);
|
||||
return NULL;
|
||||
}
|
||||
@ -316,7 +316,7 @@ static void ipc_start_client(struct mp_ipc_ctx *ctx, struct client_arg *client)
|
||||
|
||||
pthread_t client_thr;
|
||||
if (pthread_create(&client_thr, NULL, client_thread, client)) {
|
||||
mpv_detach_destroy(client->client);
|
||||
mpv_destroy(client->client);
|
||||
CloseHandle(client->client_h);
|
||||
talloc_free(client);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
|
||||
});
|
||||
return YES;
|
||||
} else {
|
||||
mpv_detach_destroy(ctx);
|
||||
mpv_destroy(ctx);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
@ -343,7 +343,7 @@ void cocoa_set_mpv_handle(struct mpv_handle *ctx)
|
||||
if ([(Application *)NSApp cocoaCB].isShuttingDown)
|
||||
return;
|
||||
#endif
|
||||
mpv_detach_destroy(_ctx);
|
||||
mpv_destroy(_ctx);
|
||||
_ctx = nil;
|
||||
break;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ static void *script_thread(void *p)
|
||||
if (arg->backend->load(arg->client, arg->fname) < 0)
|
||||
MP_ERR(arg, "Could not load %s %s\n", arg->backend->name, arg->fname);
|
||||
|
||||
mpv_detach_destroy(arg->client);
|
||||
mpv_destroy(arg->client);
|
||||
talloc_free(arg);
|
||||
return NULL;
|
||||
}
|
||||
@ -145,7 +145,7 @@ static int mp_load_script(struct MPContext *mpctx, const char *fname)
|
||||
|
||||
pthread_t thread;
|
||||
if (pthread_create(&thread, NULL, script_thread, arg)) {
|
||||
mpv_detach_destroy(arg->client);
|
||||
mpv_destroy(arg->client);
|
||||
talloc_free(arg);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user