Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xvba-video
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
xvba-video
Commits
932670e0
Commit
932670e0
authored
Jun 22, 2012
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
object_heap_allocate() returns an int and not an VA_INVALID_ID.
parent
776cc2d7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
src/xvba_buffer.c
src/xvba_buffer.c
+1
-1
src/xvba_image.c
src/xvba_image.c
+3
-1
src/xvba_subpic.c
src/xvba_subpic.c
+1
-1
src/xvba_video.c
src/xvba_video.c
+5
-1
src/xvba_video_x11.c
src/xvba_video_x11.c
+1
-1
No files found.
src/xvba_buffer.c
View file @
932670e0
...
...
@@ -195,7 +195,7 @@ create_va_buffer(
object_buffer_p
obj_buffer
;
buffer_id
=
object_heap_allocate
(
&
driver_data
->
buffer_heap
);
if
(
buffer_id
==
VA_INVALID_BUFFER
)
if
(
buffer_id
==
-
1
)
return
NULL
;
obj_buffer
=
XVBA_BUFFER
(
buffer_id
);
...
...
src/xvba_image.c
View file @
932670e0
...
...
@@ -292,7 +292,7 @@ create_image(
)
{
VAImageID
image_id
=
object_heap_allocate
(
&
driver_data
->
image_heap
);
if
(
image_id
==
VA_INVALID_ID
)
if
(
image_id
==
-
1
)
return
NULL
;
object_image_p
obj_image
=
XVBA_IMAGE
(
image_id
);
...
...
@@ -435,6 +435,7 @@ commit_hw_image(
unsigned
int
flags
)
{
/* FIXME: this function 'leaks memory' when used with subpictures */
VAStatus
status
;
object_buffer_p
const
obj_buffer
=
XVBA_BUFFER
(
obj_image
->
image
.
buf
);
...
...
@@ -462,6 +463,7 @@ commit_hw_image(
if
(
status
!=
VA_STATUS_SUCCESS
)
return
status
;
}
ASSERT
(
hw_image_hooks_glx
.
create
);
ASSERT
(
hw_image_hooks_glx
.
commit
);
status
=
hw_image_hooks_glx
.
commit
(
driver_data
,
...
...
src/xvba_subpic.c
View file @
932670e0
...
...
@@ -272,7 +272,7 @@ create_subpicture(
{
VASubpictureID
subpic_id
;
subpic_id
=
object_heap_allocate
(
&
driver_data
->
subpicture_heap
);
if
(
subpic_id
==
VA_INVALID_ID
)
if
(
subpic_id
==
-
1
)
return
NULL
;
object_subpicture_p
obj_subpicture
=
XVBA_SUBPICTURE
(
subpic_id
);
...
...
src/xvba_video.c
View file @
932670e0
...
...
@@ -385,7 +385,7 @@ xvba_CreateConfig(
return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE
;
configID
=
object_heap_allocate
(
&
driver_data
->
config_heap
);
if
(
configID
==
VA_INVALID_ID
)
if
(
configID
==
-
1
)
return
VA_STATUS_ERROR_ALLOCATION_FAILED
;
obj_config
=
XVBA_CONFIG
(
configID
);
if
(
!
obj_config
)
...
...
@@ -492,6 +492,8 @@ xvba_CreateSurfaces(
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
{
int
va_surface
=
object_heap_allocate
(
&
driver_data
->
surface_heap
);
if
(
va_surface
==
-
1
)
return
VA_STATUS_ERROR_ALLOCATION_FAILED
;
object_surface_p
obj_surface
=
XVBA_SURFACE
(
va_surface
);
if
(
!
obj_surface
)
{
va_status
=
VA_STATUS_ERROR_ALLOCATION_FAILED
;
...
...
@@ -642,6 +644,8 @@ xvba_CreateContext(
}
VAContextID
context_id
=
object_heap_allocate
(
&
driver_data
->
context_heap
);
if
(
context_id
==
-
1
)
return
VA_STATUS_ERROR_ALLOCATION_FAILED
;
object_context_p
const
obj_context
=
XVBA_CONTEXT
(
context_id
);
if
(
!
obj_context
)
return
VA_STATUS_ERROR_ALLOCATION_FAILED
;
...
...
src/xvba_video_x11.c
View file @
932670e0
...
...
@@ -38,7 +38,7 @@ output_surface_create(
)
{
VASurfaceID
surface
=
object_heap_allocate
(
&
driver_data
->
output_heap
);
if
(
surface
==
VA_INVALID_ID
)
if
(
surface
==
-
1
)
return
NULL
;
object_output_p
obj_output
=
XVBA_OUTPUT
(
surface
);
...
...
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