Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c362ce20
Commit
c362ce20
authored
Mar 30, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Do not call async reader callback if source failed to start up.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
910ec21b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
reader.c
dlls/mfreadwrite/reader.c
+7
-12
No files found.
dlls/mfreadwrite/reader.c
View file @
c362ce20
...
...
@@ -895,7 +895,7 @@ static BOOL source_reader_get_read_result(struct source_reader *reader, struct m
source_reader_release_response
(
response
);
}
return
request_sample
;
return
!
request_sample
;
}
static
HRESULT
source_reader_get_stream_read_index
(
struct
source_reader
*
reader
,
DWORD
index
,
DWORD
*
stream_index
)
...
...
@@ -984,8 +984,8 @@ static HRESULT WINAPI source_reader_async_commands_callback_Invoke(IMFAsyncCallb
struct
source_reader_async_command
*
command
;
struct
stream_response
*
response
;
DWORD
stream_index
,
stream_flags
;
BOOL
request_sample
=
FALSE
;
struct
media_stream
*
stream
;
BOOL
report_sample
=
FALSE
;
IMFSample
*
sample
=
NULL
;
LONGLONG
timestamp
=
0
;
HRESULT
hr
,
status
;
...
...
@@ -1008,10 +1008,8 @@ static HRESULT WINAPI source_reader_async_commands_callback_Invoke(IMFAsyncCallb
if
(
SUCCEEDED
(
hr
=
source_reader_start_source
(
reader
)))
{
request_sample
=
source_reader_get_read_result
(
reader
,
stream
,
command
->
flags
,
&
status
,
&
stream_index
,
&
stream_flags
,
&
timestamp
,
&
sample
);
if
(
request_sample
)
if
(
!
(
report_sample
=
source_reader_get_read_result
(
reader
,
stream
,
command
->
flags
,
&
status
,
&
stream_index
,
&
stream_flags
,
&
timestamp
,
&
sample
)))
{
stream
->
requests
++
;
source_reader_request_sample
(
reader
,
stream
);
...
...
@@ -1021,7 +1019,7 @@ static HRESULT WINAPI source_reader_async_commands_callback_Invoke(IMFAsyncCallb
LeaveCriticalSection
(
&
stream
->
cs
);
if
(
!
reques
t_sample
)
if
(
repor
t_sample
)
IMFSourceReaderCallback_OnReadSample
(
reader
->
async_callback
,
status
,
stream_index
,
stream_flags
,
timestamp
,
sample
);
...
...
@@ -1532,7 +1530,6 @@ static HRESULT source_reader_read_sample(struct source_reader *reader, DWORD ind
unsigned
int
actual_index_tmp
;
struct
media_stream
*
stream
;
LONGLONG
timestamp_tmp
;
BOOL
request_sample
;
DWORD
stream_index
;
HRESULT
hr
=
S_OK
;
...
...
@@ -1563,10 +1560,8 @@ static HRESULT source_reader_read_sample(struct source_reader *reader, DWORD ind
if
(
SUCCEEDED
(
hr
=
source_reader_start_source
(
reader
)))
{
request_sample
=
source_reader_get_read_result
(
reader
,
stream
,
flags
,
&
hr
,
actual_index
,
stream_flags
,
timestamp
,
sample
);
if
(
request_sample
)
if
(
!
source_reader_get_read_result
(
reader
,
stream
,
flags
,
&
hr
,
actual_index
,
stream_flags
,
timestamp
,
sample
))
{
while
(
list_empty
(
&
stream
->
responses
)
&&
stream
->
state
!=
STREAM_STATE_EOS
)
{
...
...
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