Skip to content
Browse files

xvba: fix segfault if refresh rate changes midstream

  • Loading branch information...
1 parent 77fdd44 commit f669df5e118a72c67770a253a1668a8987792463 @FernetMenta committed Dec 15, 2011
View
2 xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -166,6 +166,7 @@ CLinuxRendererGL::CLinuxRendererGL()
m_rgbPbo = 0;
m_dllSwScale = new DllSwScale;
+ m_bValidated = false;
}
CLinuxRendererGL::~CLinuxRendererGL()
@@ -280,6 +281,7 @@ bool CLinuxRendererGL::Configure(unsigned int width, unsigned int height, unsign
// Ensure that textures are recreated and rendering starts only after the 1st
// frame is loaded after every call to Configure().
+ Flush();
m_bValidated = false;
for (int i = 0 ; i<m_NumYV12Buffers ; i++)
View
2 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
@@ -1327,7 +1327,7 @@ void CDecoder::FinishGL()
glDeleteTextures(1, &m_flipBuffer[i].glTexture[j]);
m_flipBuffer[i].glTexture[j] = 0;
}
- if (m_flipBuffer[i].glSurface[j])
+ if (m_flipBuffer[i].glSurface[j] && m_xvbaSession)
{
g_XVBA_vtable.DestroySurface(m_flipBuffer[i].glSurface[j]);
m_flipBuffer[i].glSurface[j] = 0;
View
1 xbmc/peripherals/Peripherals.cpp
@@ -19,6 +19,7 @@
*
*/
+#include "system.h"
#include "Peripherals.h"
#include "bus/PeripheralBus.h"
#include "devices/PeripheralBluetooth.h"

0 comments on commit f669df5

Please sign in to comment.
Something went wrong with that request. Please try again.