diff options
author | wm4 <wm4@nowhere> | 2014-07-31 03:12:18 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-31 03:12:18 +0200 |
commit | aaa90e1a337dac7f1ef0e8e289d50950a67c90a1 (patch) | |
tree | 0ba6d6332bcbf8d31fef2c397c10dcb7d48098db /player | |
parent | dacbaea1a8c4fd0a9ad32c7c9b2e5ec49016660f (diff) | |
download | mpv-aaa90e1a337dac7f1ef0e8e289d50950a67c90a1.tar.bz2 mpv-aaa90e1a337dac7f1ef0e8e289d50950a67c90a1.tar.xz |
client API: fix deadlock when calling mpv_terminate_destroy before init
This is perfectly allowed, but was ignored, because it's a corner case.
It doesn't actually wait for other clients to be destroyed, but on the
other hand I think there's no way to have other clients before
initialization.
CC: @mpv-player/stable
Diffstat (limited to 'player')
-rw-r--r-- | player/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/client.c b/player/client.c index 0a64dd855d..49cb866edb 100644 --- a/player/client.c +++ b/player/client.c @@ -335,7 +335,7 @@ void mpv_terminate_destroy(mpv_handle *ctx) mpv_command(ctx, (const char*[]){"quit", NULL}); - if (!ctx->owner) { + if (!ctx->owner || !ctx->mpctx->initialized) { mpv_detach_destroy(ctx); return; } |