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
bd1bfd2c
Commit
bd1bfd2c
authored
May 13, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Avoid unnecessary prerolling calls in SAR.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
333e3a53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
sar.c
dlls/mf/sar.c
+8
-1
No files found.
dlls/mf/sar.c
View file @
bd1bfd2c
...
...
@@ -41,6 +41,7 @@ enum stream_state
enum
audio_renderer_flags
{
SAR_SHUT_DOWN
=
0x1
,
SAR_PREROLLED
=
0x2
,
};
struct
audio_renderer
...
...
@@ -179,6 +180,7 @@ static void audio_renderer_release_audio_client(struct audio_renderer *renderer)
if
(
renderer
->
audio_volume
)
ISimpleAudioVolume_Release
(
renderer
->
audio_volume
);
renderer
->
audio_volume
=
NULL
;
renderer
->
flags
&=
~
SAR_PREROLLED
;
}
static
ULONG
WINAPI
audio_renderer_sink_Release
(
IMFMediaSink
*
iface
)
...
...
@@ -409,10 +411,14 @@ static const IMFMediaSinkVtbl audio_renderer_sink_vtbl =
static
void
audio_renderer_preroll
(
struct
audio_renderer
*
renderer
)
{
int
i
;
unsigned
int
i
;
if
(
renderer
->
flags
&
SAR_PREROLLED
)
return
;
for
(
i
=
0
;
i
<
2
;
++
i
)
IMFMediaEventQueue_QueueEventParamVar
(
renderer
->
stream_event_queue
,
MEStreamSinkRequestSample
,
&
GUID_NULL
,
S_OK
,
NULL
);
renderer
->
flags
|=
SAR_PREROLLED
;
}
static
HRESULT
WINAPI
audio_renderer_preroll_QueryInterface
(
IMFMediaSinkPreroll
*
iface
,
REFIID
riid
,
void
**
obj
)
...
...
@@ -586,6 +592,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockStop(IMFClockStateSink *i
else
WARN
(
"Failed to stop audio client, hr %#x.
\n
"
,
hr
);
renderer
->
state
=
STREAM_STATE_STOPPED
;
renderer
->
flags
&=
~
SAR_PREROLLED
;
}
}
else
...
...
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