diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-11-30 10:59:34 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-11-30 10:59:34 +0800 |
commit | 867fcd649a1890d938cbef13d993802c199da4e2 (patch) | |
tree | e51da4960ac5ba30ee4bcc82ad8872472d3ea705 /src | |
parent | 419e4cb78d10af01419bd11b612e97755429f70a (diff) | |
download | libva-867fcd649a1890d938cbef13d993802c199da4e2.tar.gz |
Assign the magic number to a macro
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/va.c | 2 | ||||
-rw-r--r-- | src/va_backend.h | 1 | ||||
-rw-r--r-- | src/x11/va_x11.c | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -58,7 +58,7 @@ static int va_debug_trace = 0; static int vaDisplayIsValid(VADisplay dpy) { VADisplayContextP pDisplayContext = (VADisplayContextP)dpy; - return pDisplayContext && (pDisplayContext->vadpy_magic == 0x789abcde) && pDisplayContext->vaIsValid(pDisplayContext); + return pDisplayContext && (pDisplayContext->vadpy_magic == VA_DISPLAY_MAGIC) && pDisplayContext->vaIsValid(pDisplayContext); } static void va_errorMessage(const char *msg, ...) diff --git a/src/va_backend.h b/src/va_backend.h index e4faa79..d514ba0 100644 --- a/src/va_backend.h +++ b/src/va_backend.h @@ -396,6 +396,7 @@ struct VADriverContext void *dri_state; }; +#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */ struct VADisplayContext { int vadpy_magic; diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c index 42adb9e..3e85ba3 100644 --- a/src/x11/va_x11.c +++ b/src/x11/va_x11.c @@ -189,7 +189,7 @@ VADisplay vaGetDisplay ( dri_state = calloc(1, sizeof(*dri_state)); if (pDisplayContext && pDriverContext && dri_state) { - pDisplayContext->vadpy_magic = 0x789abcde; + pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC; pDriverContext->x11_dpy = native_dpy; pDisplayContext->pNext = pDisplayContexts; |