Commit 867fcd64 authored by Austin Yuan's avatar Austin Yuan

Assign the magic number to a macro

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent 419e4cb7
......@@ -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, ...)
......
......@@ -396,6 +396,7 @@ struct VADriverContext
void *dri_state;
};
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
struct VADisplayContext
{
int vadpy_magic;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment