From ce1f5e78c2b10e24c78d7ee65d7196093709b8ce Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 May 2018 16:51:53 +0200 Subject: player: rename "lock" to "abort_lock" If a struct as large as MPContext contains a field named "lock", it creates the impression that it is the primary lock for MPContext. This is wrong, the lock just protects a single field. --- player/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index bc14bbce1c..d744c9cf12 100644 --- a/player/main.c +++ b/player/main.c @@ -189,7 +189,7 @@ void mp_destroy(struct MPContext *mpctx) uninit_libav(mpctx->global); mp_msg_uninit(mpctx->global); - pthread_mutex_destroy(&mpctx->lock); + pthread_mutex_destroy(&mpctx->abort_lock); talloc_free(mpctx); } @@ -283,7 +283,7 @@ struct MPContext *mp_create(void) .thread_pool = mp_thread_pool_create(mpctx, 0, 1, 30), }; - pthread_mutex_init(&mpctx->lock, NULL); + pthread_mutex_init(&mpctx->abort_lock, NULL); mpctx->global = talloc_zero(mpctx, struct mpv_global); -- cgit v1.2.3