mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 14:16:40 +00:00
xbmc-pvr: add patch to fix more vdpau crashes
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
d44c70ae0d
commit
ebbb9ccd6e
@ -0,0 +1,96 @@
|
||||
From a9b48dfd39366c86ac79afb0ed545d1c234165a8 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Sat, 10 Dec 2011 12:20:15 +0100
|
||||
Subject: [PATCH 1/2] vdpau: lock graphics context when accessing x11 display
|
||||
|
||||
---
|
||||
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 9 ++++++++-
|
||||
1 files changed, 8 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
index 17a988b..ee02947 100644
|
||||
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
|
||||
@@ -670,6 +670,8 @@ void CVDPAU::SetDeinterlacing()
|
||||
|
||||
void CVDPAU::InitVDPAUProcs()
|
||||
{
|
||||
+ CSingleLock glock(g_graphicsContext);
|
||||
+
|
||||
char* error;
|
||||
|
||||
(void)dlerror();
|
||||
@@ -687,7 +689,6 @@ void CVDPAU::InitVDPAUProcs()
|
||||
|
||||
if (dl_vdp_device_create_x11)
|
||||
{
|
||||
- CSingleLock lock(g_graphicsContext);
|
||||
m_Display = g_Windowing.GetDisplay();
|
||||
}
|
||||
|
||||
@@ -776,6 +777,8 @@ void CVDPAU::InitVDPAUProcs()
|
||||
|
||||
void CVDPAU::FiniVDPAUProcs()
|
||||
{
|
||||
+ CSingleLock glock(g_graphicsContext);
|
||||
+
|
||||
while (!m_videoSurfaces.empty())
|
||||
{
|
||||
vdpau_render_state *render = m_videoSurfaces.back();
|
||||
@@ -928,6 +931,8 @@ bool CVDPAU::ConfigOutputMethod(AVCodecContext *avctx, AVFrame *pFrame)
|
||||
|
||||
FiniOutputMethod();
|
||||
|
||||
+ CSingleLock glock(g_graphicsContext);
|
||||
+
|
||||
MakePixmap(avctx->width,avctx->height);
|
||||
|
||||
vdp_st = vdp_presentation_queue_target_create_x11(vdp_device,
|
||||
@@ -976,6 +981,8 @@ bool CVDPAU::ConfigOutputMethod(AVCodecContext *avctx, AVFrame *pFrame)
|
||||
|
||||
bool CVDPAU::FiniOutputMethod()
|
||||
{
|
||||
+ CSingleLock glock(g_graphicsContext);
|
||||
+
|
||||
VdpStatus vdp_st;
|
||||
|
||||
if (vdp_flip_queue != VDP_INVALID_HANDLE)
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
|
||||
From 8da716c22f8bd8e3ff9a235e134a7a88de3fac6b Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Sat, 10 Dec 2011 12:21:35 +0100
|
||||
Subject: [PATCH 2/2] lock graphics context when polling events, display
|
||||
connection might be in use by e.g. vdpau
|
||||
|
||||
---
|
||||
xbmc/windowing/WinEventsSDL.cpp | 10 +++++++++-
|
||||
1 files changed, 9 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/xbmc/windowing/WinEventsSDL.cpp b/xbmc/windowing/WinEventsSDL.cpp
|
||||
index afff390..2e8b869 100644
|
||||
--- a/xbmc/windowing/WinEventsSDL.cpp
|
||||
+++ b/xbmc/windowing/WinEventsSDL.cpp
|
||||
@@ -216,8 +216,16 @@ bool CWinEventsSDL::MessagePump()
|
||||
SDL_Event event;
|
||||
bool ret = false;
|
||||
|
||||
- while (SDL_PollEvent(&event))
|
||||
+ while (1)
|
||||
{
|
||||
+ {
|
||||
+#if defined(HAS_GLX)
|
||||
+ CSingleLock lock(g_graphicsContext);
|
||||
+#endif
|
||||
+ if (!SDL_PollEvent(&event))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
switch(event.type)
|
||||
{
|
||||
case SDL_QUIT:
|
||||
--
|
||||
1.7.5.4
|
||||
|
Loading…
x
Reference in New Issue
Block a user