Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
867fcd64
Commit
867fcd64
authored
Nov 30, 2009
by
Austin Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assign the magic number to a macro
Signed-off-by:
Austin Yuan
<
shengquan.yuan@intel.com
>
parent
419e4cb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
src/va.c
src/va.c
+1
-1
src/va_backend.h
src/va_backend.h
+1
-0
src/x11/va_x11.c
src/x11/va_x11.c
+1
-1
No files found.
src/va.c
View file @
867fcd64
...
@@ -58,7 +58,7 @@ static int va_debug_trace = 0;
...
@@ -58,7 +58,7 @@ static int va_debug_trace = 0;
static
int
vaDisplayIsValid
(
VADisplay
dpy
)
static
int
vaDisplayIsValid
(
VADisplay
dpy
)
{
{
VADisplayContextP
pDisplayContext
=
(
VADisplayContextP
)
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
,
...)
static
void
va_errorMessage
(
const
char
*
msg
,
...)
...
...
src/va_backend.h
View file @
867fcd64
...
@@ -396,6 +396,7 @@ struct VADriverContext
...
@@ -396,6 +396,7 @@ struct VADriverContext
void
*
dri_state
;
void
*
dri_state
;
};
};
#define VA_DISPLAY_MAGIC 0x56414430
/* VAD0 */
struct
VADisplayContext
struct
VADisplayContext
{
{
int
vadpy_magic
;
int
vadpy_magic
;
...
...
src/x11/va_x11.c
View file @
867fcd64
...
@@ -189,7 +189,7 @@ VADisplay vaGetDisplay (
...
@@ -189,7 +189,7 @@ VADisplay vaGetDisplay (
dri_state
=
calloc
(
1
,
sizeof
(
*
dri_state
));
dri_state
=
calloc
(
1
,
sizeof
(
*
dri_state
));
if
(
pDisplayContext
&&
pDriverContext
&&
dri_state
)
if
(
pDisplayContext
&&
pDriverContext
&&
dri_state
)
{
{
pDisplayContext
->
vadpy_magic
=
0x789abcde
;
pDisplayContext
->
vadpy_magic
=
VA_DISPLAY_MAGIC
;
pDriverContext
->
x11_dpy
=
native_dpy
;
pDriverContext
->
x11_dpy
=
native_dpy
;
pDisplayContext
->
pNext
=
pDisplayContexts
;
pDisplayContext
->
pNext
=
pDisplayContexts
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment