From 7edeb980c03eb59658c8b1db1ea73a461bacea0c Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Sun, 11 Sep 2016 00:42:59 +0200 Subject: [PATCH] qsv: Fix crash attempting to destroy mutex. Originally part of a2d31ec1c6109424d193832aa83db6958292d797. --- libhb/qsv_libav.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libhb/qsv_libav.c b/libhb/qsv_libav.c index dac7733c3..0222be9c7 100644 --- a/libhb/qsv_libav.c +++ b/libhb/qsv_libav.c @@ -538,10 +538,14 @@ void av_qsv_list_close(av_qsv_list ** _l) if (l->mutex){ mut_ret = pthread_mutex_unlock(l->mutex); - if( mut_ret ) + if (mut_ret) hb_log("QSV: pthread_mutex_unlock issue[%d] at %s", mut_ret, __FUNCTION__); - mut_ret = pthread_mutex_destroy(&l->mutex); + mut_ret = pthread_mutex_destroy(l->mutex); + if (mut_ret) + hb_log("QSV: pthread_mutex_destroy issue[%d] at %s", mut_ret, __FUNCTION__); mut_ret = pthread_mutexattr_destroy(&l->mta); + if (mut_ret) + hb_log("QSV: pthread_mutexattr_destroy issue[%d] at %s", mut_ret, __FUNCTION__); } av_freep(_l); } -- 2.40.0