Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
vlc
Commits
7b27f950
Commit
7b27f950
authored
Jul 11, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used VA_INVALID_SURFACE when appropriate.
parent
84f1839b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+5
-4
No files found.
modules/codec/avcodec/vaapi.c
View file @
7b27f950
...
@@ -176,7 +176,7 @@ error:
...
@@ -176,7 +176,7 @@ error:
static
void
DestroySurfaces
(
vlc_va_vaapi_t
*
p_va
)
static
void
DestroySurfaces
(
vlc_va_vaapi_t
*
p_va
)
{
{
if
(
p_va
->
image
.
image_id
)
if
(
p_va
->
image
.
image_id
!=
VA_INVALID_SURFACE
)
{
{
CopyCleanCache
(
&
p_va
->
image_cache
);
CopyCleanCache
(
&
p_va
->
image_cache
);
vaDestroyImage
(
p_va
->
p_display
,
p_va
->
image
.
image_id
);
vaDestroyImage
(
p_va
->
p_display
,
p_va
->
image
.
image_id
);
...
@@ -195,7 +195,7 @@ static void DestroySurfaces( vlc_va_vaapi_t *p_va )
...
@@ -195,7 +195,7 @@ static void DestroySurfaces( vlc_va_vaapi_t *p_va )
free
(
p_va
->
p_surface
);
free
(
p_va
->
p_surface
);
/* */
/* */
p_va
->
image
.
image_id
=
0
;
p_va
->
image
.
image_id
=
VA_INVALID_SURFACE
;
p_va
->
i_context_id
=
0
;
p_va
->
i_context_id
=
0
;
p_va
->
p_surface
=
NULL
;
p_va
->
p_surface
=
NULL
;
p_va
->
i_surface_width
=
0
;
p_va
->
i_surface_width
=
0
;
...
@@ -210,6 +210,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
...
@@ -210,6 +210,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
p_va
->
p_surface
=
calloc
(
p_va
->
i_surface_count
,
sizeof
(
*
p_va
->
p_surface
)
);
p_va
->
p_surface
=
calloc
(
p_va
->
i_surface_count
,
sizeof
(
*
p_va
->
p_surface
)
);
if
(
!
p_va
->
p_surface
)
if
(
!
p_va
->
p_surface
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
p_va
->
image
.
image_id
=
VA_INVALID_SURFACE
;
/* Create surfaces */
/* Create surfaces */
VASurfaceID
pi_surface_id
[
p_va
->
i_surface_count
];
VASurfaceID
pi_surface_id
[
p_va
->
i_surface_count
];
...
@@ -261,7 +262,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
...
@@ -261,7 +262,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
{
{
if
(
vaCreateImage
(
p_va
->
p_display
,
&
p_fmt
[
i
],
i_width
,
i_height
,
&
p_va
->
image
)
)
if
(
vaCreateImage
(
p_va
->
p_display
,
&
p_fmt
[
i
],
i_width
,
i_height
,
&
p_va
->
image
)
)
{
{
p_va
->
image
.
image_id
=
0
;
p_va
->
image
.
image_id
=
VA_INVALID_SURFACE
;
continue
;
continue
;
}
}
/* Validate that vaGetImage works with this format */
/* Validate that vaGetImage works with this format */
...
@@ -270,7 +271,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
...
@@ -270,7 +271,7 @@ static int CreateSurfaces( vlc_va_vaapi_t *p_va, void **pp_hw_ctx, vlc_fourcc_t
p_va
->
image
.
image_id
)
)
p_va
->
image
.
image_id
)
)
{
{
vaDestroyImage
(
p_va
->
p_display
,
p_va
->
image
.
image_id
);
vaDestroyImage
(
p_va
->
p_display
,
p_va
->
image
.
image_id
);
p_va
->
image
.
image_id
=
0
;
p_va
->
image
.
image_id
=
VA_INVALID_SURFACE
;
continue
;
continue
;
}
}
...
...
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