quartz/vmr9: Signal state change completion only after PresentImage() has been called.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8803a81b33
commit
d3ef27f756
|
@ -38,6 +38,11 @@ static struct null_renderer *impl_from_strmbase_renderer(struct strmbase_rendere
|
|||
|
||||
static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *iface, IMediaSample *sample)
|
||||
{
|
||||
struct null_renderer *filter = impl_from_strmbase_renderer(iface);
|
||||
|
||||
if (filter->renderer.filter.state == State_Paused)
|
||||
SetEvent(filter->renderer.state_event);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -2943,6 +2943,11 @@ static void test_renderless_present(IFilterGraph2 *graph, IMemInputPin *input)
|
|||
thread = send_frame(input);
|
||||
hr = IMediaControl_GetState(control, 1000, &state);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
/* Atelier Sophie uses the VMR in renderless mode, calls
|
||||
* IMediaControl::Run() from a stopped state and expects that
|
||||
* IMediaControl::GetState() returns S_OK only after PresentImage() has
|
||||
* been called. */
|
||||
ok(allocator_got_PresentImage == 1, "Got %u calls to PresentImage().\n", allocator_got_PresentImage);
|
||||
|
||||
hr = IMediaControl_Run(control);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
|
|
@ -111,6 +111,7 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
|
|||
|
||||
filter->current_sample = pSample;
|
||||
|
||||
SetEvent(filter->renderer.state_event);
|
||||
LeaveCriticalSection(&filter->renderer.csRenderLock);
|
||||
WaitForMultipleObjects(2, events, FALSE, INFINITE);
|
||||
EnterCriticalSection(&filter->renderer.csRenderLock);
|
||||
|
|
|
@ -315,6 +315,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
|
|||
|
||||
if (filter->renderer.filter.state == State_Paused)
|
||||
{
|
||||
SetEvent(filter->renderer.state_event);
|
||||
LeaveCriticalSection(&filter->renderer.csRenderLock);
|
||||
WaitForMultipleObjects(2, events, FALSE, INFINITE);
|
||||
EnterCriticalSection(&filter->renderer.csRenderLock);
|
||||
|
|
|
@ -193,8 +193,6 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
|
|||
}
|
||||
|
||||
EnterCriticalSection(&filter->csRenderLock);
|
||||
if (filter->filter.state == State_Paused)
|
||||
SetEvent(filter->state_event);
|
||||
|
||||
if (filter->filter.clock && SUCCEEDED(IMediaSample_GetTime(sample, &start, &stop)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue