]> granicus.if.org Git - handbrake/commitdiff
qsv: Fix crash attempting to destroy mutex.
authorTim Walker <tdskywalker@gmail.com>
Sat, 10 Sep 2016 22:42:59 +0000 (00:42 +0200)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Sat, 17 Dec 2016 15:28:51 +0000 (07:28 -0800)
Originally part of a2d31ec1c6109424d193832aa83db6958292d797.

libhb/qsv_libav.c

index dac7733c3bbd4e693b63751a162dd98883739ce8..0222be9c71348eff9cee6174daa00d3ad798639d 100644 (file)
@@ -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);
 }