Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2764d3e3
Commit
2764d3e3
authored
Apr 19, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Add missing allocation error path.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79e2d5d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
presenter.c
dlls/evr/presenter.c
+11
-4
No files found.
dlls/evr/presenter.c
View file @
2764d3e3
...
...
@@ -391,17 +391,21 @@ static HRESULT video_presenter_invalidate_media_type(struct video_presenter *pre
return
hr
;
}
static
void
video_presenter_sample_queue_init
(
struct
video_presenter
*
presenter
)
static
HRESULT
video_presenter_sample_queue_init
(
struct
video_presenter
*
presenter
)
{
struct
sample_queue
*
queue
=
&
presenter
->
thread
.
queue
;
if
(
queue
->
size
)
return
;
return
S_OK
;
memset
(
queue
,
0
,
sizeof
(
*
queue
));
queue
->
samples
=
calloc
(
presenter
->
allocator_capacity
,
sizeof
(
*
queue
->
samples
));
if
(
!
(
queue
->
samples
=
calloc
(
presenter
->
allocator_capacity
,
sizeof
(
*
queue
->
samples
))))
return
E_OUTOFMEMORY
;
queue
->
size
=
presenter
->
allocator_capacity
;
queue
->
back
=
queue
->
size
-
1
;
return
S_OK
;
}
static
void
video_presenter_sample_queue_push
(
struct
video_presenter
*
presenter
,
IMFSample
*
sample
)
...
...
@@ -714,10 +718,13 @@ static DWORD CALLBACK video_presenter_streaming_thread(void *arg)
static
HRESULT
video_presenter_start_streaming
(
struct
video_presenter
*
presenter
)
{
HRESULT
hr
;
if
(
presenter
->
thread
.
hthread
)
return
S_OK
;
video_presenter_sample_queue_init
(
presenter
);
if
(
FAILED
(
hr
=
video_presenter_sample_queue_init
(
presenter
)))
return
hr
;
if
(
!
(
presenter
->
thread
.
ready_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
)))
return
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
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