diff options
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/player/main.c b/player/main.c index 0bfd25bdd5..d7b34e0ef8 100644 --- a/player/main.c +++ b/player/main.c @@ -23,6 +23,7 @@ #include <assert.h> #include <ctype.h> #include <string.h> +#include <pthread.h> #include "config.h" #include "talloc.h" @@ -148,6 +149,9 @@ void mp_destroy(struct MPContext *mpctx) } uninit_libav(mpctx->global); + if (mpctx->autodetach) + pthread_detach(pthread_self()); + mp_msg_uninit(mpctx->global); talloc_free(mpctx); } |