[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] =?utf-8?q?HG=3A_xine-lib-1=2E2=3A_vaapi=3A_fix_lock_sc?= =?utf-8?q?ope?=
From: Petri_Hintukainen via Xine-cvslog <xine-cvslog () lists ! sourceforge ! net
Date: 2017-11-16 11:17:38
Message-ID: d4bb154e521b2161efdf.1510825670 () hg ! debian ! org
[Download RAW message or body]
# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1510825670 -7200
# Node ID d4bb154e521b2161efdfa9c6ebb4738ea99bdb12
# Branch default
# Parent d3704c5f5820259d66de544dab3289cbe0804f1a
vaapi: fix lock scope
diff --git a/src/video_out/video_out_vaapi.c b/src/video_out/video_out_vaapi.c
--- a/src/video_out/video_out_vaapi.c
+++ b/src/video_out/video_out_vaapi.c
@@ -3555,15 +3555,17 @@
vaapi_redraw_needed (this_gen);
+ pthread_mutex_lock(&this->vaapi_lock);
+ DO_LOCKDISPLAY;
+
/* posible race could happen while the lock is opened */
if(!this->va_context || !this->va_context->valid_context) {
+ DO_UNLOCKDISPLAY;
+ pthread_mutex_unlock(&this->vaapi_lock);
frame_gen->free (frame_gen);
return;
}
- pthread_mutex_lock(&this->vaapi_lock);
- DO_LOCKDISPLAY;
-
#ifdef ENABLE_VA_GLX
/* initialize opengl rendering */
if(this->opengl_render && this->init_opengl_render && va_context->valid_context) {
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic