summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-11-23 16:22:34 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2009-11-23 16:22:34 +0800
commit49d2ed00daea7cc22234bbc01efe66f313357a6c (patch)
tree63f60a7b7d4409df98eb9f09627b6274eea693bc
parentf726572648d8310d9671e2f24c57f35fcacb93b7 (diff)
parent59575183a502c3f872f48c9099f1a0c6eb670193 (diff)
downloadlibva-ww48.2-beta-rc3.tar.gz
Merge branch 'master' into local-branch-testing-alpha2ww48.2-beta-rc320091126_5.1.0.0128
Conflicts: src/va.c src/x11/va_x11.c Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--src/va.c2
-rw-r--r--[-rwxr-xr-x]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 100755..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;