quartz/vmr9: Render preroll samples.
The documentation specifies that preroll samples shouldn't be rendered, but the VMR9 renders them anyway. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
72f9472492
commit
b9063c4b7e
|
@ -983,6 +983,9 @@ static HANDLE send_frame(IMemInputPin *sink)
|
|||
hr = IMediaSample_SetTime(sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IMediaSample_SetPreroll(sample, TRUE);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
params->sink = sink;
|
||||
params->sample = sample;
|
||||
thread = CreateThread(NULL, 0, frame_thread, params, 0, NULL);
|
||||
|
|
|
@ -1011,6 +1011,9 @@ static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, DWO
|
|||
hr = IMediaSample_SetTime(sample, &start_time, &end_time);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IMediaSample_SetPreroll(sample, TRUE);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
params->sink = sink;
|
||||
params->sample = sample;
|
||||
thread = CreateThread(NULL, 0, frame_thread, params, 0, NULL);
|
||||
|
|
|
@ -244,12 +244,6 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
|
|||
if (IMediaSample_IsSyncPoint(sample) == S_OK)
|
||||
info.dwFlags |= VMR9Sample_SyncPoint;
|
||||
|
||||
/* If we render ourselves, and this is a preroll sample, discard it */
|
||||
if (info.dwFlags & VMR9Sample_Preroll)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (FAILED(hr = IMediaSample_GetPointer(sample, &data)))
|
||||
{
|
||||
ERR("Failed to get pointer to sample data, hr %#x.\n", hr);
|
||||
|
@ -504,15 +498,6 @@ static void vmr_stop_stream(struct strmbase_renderer *iface)
|
|||
ResetEvent(This->run_event);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI VMR9_ShouldDrawSampleNow(struct strmbase_renderer *iface,
|
||||
IMediaSample *pSample, REFERENCE_TIME *start, REFERENCE_TIME *end)
|
||||
{
|
||||
/* Preroll means the sample isn't shown, this is used for key frames and things like that */
|
||||
if (IMediaSample_IsPreroll(pSample) == S_OK)
|
||||
return E_FAIL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
||||
|
@ -668,7 +653,6 @@ static const struct strmbase_renderer_ops renderer_ops =
|
|||
.renderer_init_stream = vmr_init_stream,
|
||||
.renderer_start_stream = vmr_start_stream,
|
||||
.renderer_stop_stream = vmr_stop_stream,
|
||||
.pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,
|
||||
.renderer_connect = vmr_connect,
|
||||
.pfnBreakConnect = VMR9_BreakConnect,
|
||||
.renderer_destroy = vmr_destroy,
|
||||
|
|
Loading…
Reference in New Issue