[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_add_missing?= =?utf-8?q?_display_locking_in_in
From:       Petri_Hintukainen via Xine-cvslog <xine-cvslog () lists ! sourceforge ! net
Date:       2017-09-30 12:57:44
Message-ID: e46c893c9511da49ed0f.1506695509 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1506695509 -10800
# Node ID e46c893c9511da49ed0fbd90484a28a59caa3a17
# Branch  default
# Parent  f1b3ef9a53d3e3bf4c3cc1640067deef2c46d7a3
vaapi: add missing display locking in init

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
@@ -4064,11 +4064,14 @@
         _("vaapi: opengl rendering tfp"),
         20, vaapi_opengl_use_tfp, this );
 
+
+  DO_LOCKDISPLAY;
   if(this->opengl_render) {
       this->opengl_render = vaapi_opengl_verify_direct (visual);
       if(!this->opengl_render)
         xprintf (this->xine, XINE_VERBOSITY_LOG, LOG_MODULE " vaapi_open: Opengl \
indirect/software rendering does not work. Fallback to plain VAAPI output !!!!\n");  \
} +  DO_UNLOCKDISPLAY;
 
   this->valid_opengl_context            = 0;
   this->gl_vinfo                        = NULL;
@@ -4099,6 +4102,8 @@
   this->sc.user_data            = visual->user_data;
   this->sc.user_ratio           = XINE_VO_ASPECT_AUTO;
 
+  DO_LOCKDISPLAY;
+
   black_pixel         = BlackPixel(this->display, this->screen);
 
   XGetWindowAttributes(this->display, this->drawable, &wattr);
@@ -4119,14 +4124,18 @@
                              0, 0, 1, 1, 0, depth,
                              InputOutput, vi->visual, xswa_mask, &xswa);
 
-  if(this->window == None)
+  if(this->window == None) {
+    DO_UNLOCKDISPLAY;
     return NULL;
+  }
 
   XSelectInput(this->display, this->window, x11_event_mask);
 
   XMapWindow(this->display, this->window);
   vaapi_x11_wait_event(this->display, this->window, MapNotify);
 
+  DO_UNLOCKDISPLAY;
+
   if(vi != &visualInfo)
     XFree(vi);
 

------------------------------------------------------------------------------
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