summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-11-13 21:53:26 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-11-13 21:53:26 +0000
commit68ecbc34f1cb29dfda116724c87d602eba961eb2 (patch)
tree8f01f986293711aa779535b6fa277898284ca456 /libvo
parent06ac97d79f4376b5ea655c4922f2e919ca9d6ff3 (diff)
downloadmpv-68ecbc34f1cb29dfda116724c87d602eba961eb2.tar.bz2
mpv-68ecbc34f1cb29dfda116724c87d602eba961eb2.tar.xz
disable *SwapInterval function when extensions are missing, since it
can cause crashes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16985 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index d6a3a153ad..f23d0728e6 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -251,6 +251,7 @@ static void *setNull(const GLubyte *s) {
* \param getProcAddress function to resolve function names, may be NULL
*/
static void getFunctions(void *(*getProcAddress)(const GLubyte *)) {
+ const char *extensions = glGetString(GL_EXTENSIONS);
if (!getProcAddress)
getProcAddress = setNull;
GenBuffers = getProcAddress("glGenBuffers");
@@ -323,6 +324,9 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *)) {
ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fARB");
if (!ProgramEnvParameter4f)
ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fNV");
+ if (!extensions || !strstr(extensions, "_swap_control"))
+ SwapInterval = NULL;
+ else {
SwapInterval = getProcAddress("glXSwapInterval");
if (!SwapInterval)
SwapInterval = getProcAddress("glXSwapIntervalEXT");
@@ -334,6 +338,7 @@ static void getFunctions(void *(*getProcAddress)(const GLubyte *)) {
SwapInterval = getProcAddress("wglSwapIntervalEXT");
if (!SwapInterval)
SwapInterval = getProcAddress("wglSwapIntervalSGI");
+ }
}
/**