summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-11-23 16:21:41 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2009-11-23 16:21:41 +0800
commit59575183a502c3f872f48c9099f1a0c6eb670193 (patch)
tree63f60a7b7d4409df98eb9f09627b6274eea693bc
parent1ead54598b3562dec0bb17e9a35284a274c47056 (diff)
parentec0e66e57c4ee66b89a9a886f9d464da5893aac8 (diff)
downloadlibva-ww48.3-video.tar.gz
Merge branch 'master' of git+ssh://AustinYuan@git.freedesktop.org/git/libvaww49.1-videoww48.4-videoww48.3-videoww48.2-video
-rw-r--r--src/va.c2
-rw-r--r--src/va_backend.h2
-rw-r--r--src/x11/va_x11.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/va.c b/src/va.c
index 6bc9c06..2cdbe02 100644
--- a/src/va.c
+++ b/src/va.c
@@ -58,7 +58,7 @@ static int va_debug_trace = 0;
static int vaDisplayIsValid(VADisplay dpy)
{
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
- return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext);
+ return pDisplayContext && (pDisplayContext->vadpy_magic == 0x789abcde) && pDisplayContext->vaIsValid(pDisplayContext);
}
static void va_errorMessage(const char *msg, ...)
diff --git a/src/va_backend.h b/src/va_backend.h
index 6f858f5..e4faa79 100644
--- a/src/va_backend.h
+++ b/src/va_backend.h
@@ -398,6 +398,8 @@ struct VADriverContext
struct VADisplayContext
{
+ int vadpy_magic;
+
VADisplayContextP pNext;
VADriverContextP pDriverContext;
diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
index 5908fbe..42adb9e 100644
--- a/src/x11/va_x11.c
+++ b/src/x11/va_x11.c
@@ -189,6 +189,8 @@ VADisplay vaGetDisplay (
dri_state = calloc(1, sizeof(*dri_state));
if (pDisplayContext && pDriverContext && dri_state)
{
+ pDisplayContext->vadpy_magic = 0x789abcde;
+
pDriverContext->x11_dpy = native_dpy;
pDisplayContext->pNext = pDisplayContexts;
pDisplayContext->pDriverContext = pDriverContext;