This allows "UNDER NIGHT IN-BIRTH Exe:Late" to render video.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/filtergraph.c | 18 ++++++++++-------- dlls/quartz/tests/filtergraph.c | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index e135f4b6cc7..3b06d32c20a 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2441,16 +2441,18 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * return hr; }
-static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, - LONGLONG *pStop) +static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, + LONGLONG *current, LONGLONG *stop) { - struct filter_graph *This = impl_from_IMediaSeeking(iface); - HRESULT hr; + struct filter_graph *graph = impl_from_IMediaSeeking(iface); + HRESULT hr = S_OK;
- TRACE("(%p/%p)->(%p, %p)\n", This, iface, pCurrent, pStop); - hr = IMediaSeeking_GetCurrentPosition(iface, pCurrent); - if (SUCCEEDED(hr)) - hr = IMediaSeeking_GetStopPosition(iface, pStop); + TRACE("graph %p, current %p, stop %p.\n", graph, current, stop); + + if (current) + hr = IMediaSeeking_GetCurrentPosition(iface, current); + if (SUCCEEDED(hr) && stop) + hr = IMediaSeeking_GetStopPosition(iface, stop);
return hr; } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 9219b30cec7..4fcd27b2918 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -4098,14 +4098,14 @@ static void test_graph_seeking(void) ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
hr = IMediaSeeking_GetPositions(seeking, NULL, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMediaSeeking_GetPositions(seeking, NULL, &stop); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetCurrentPosition(seeking, NULL);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/videorenderer.c | 2 +- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/window.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index ac2cadc4b17..9e6a618a36e 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2702,7 +2702,7 @@ static void test_basic_video(void) reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(reftime == 0.02, "Got frame rate %.16e.\n", reftime); + ok(reftime == 0.02, "Got frame rate %.16e.\n", reftime);
l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 092ee871328..789c5e429a5 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -3717,7 +3717,7 @@ static void test_basic_video(void) reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(compare_double(reftime, 0.02, 1 << 28), "Got frame rate %.16e.\n", reftime); + ok(compare_double(reftime, 0.02, 1 << 28), "Got frame rate %.16e.\n", reftime);
l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l); diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index a5ff4979efc..07e042eccdb 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -755,7 +755,7 @@ static HRESULT WINAPI basic_video_get_AvgTimePerFrame(IBasicVideo *iface, REFTIM
TRACE("window %p, reftime %p.\n", window, reftime);
- *reftime = get_video_format(window)->AvgTimePerFrame; + *reftime = (double)get_video_format(window)->AvgTimePerFrame / 1e7; return S_OK; }
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index c2b5e590db4..20de73c173d 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -413,7 +413,11 @@ static GstCaps *amt_to_gst_caps_video(const AM_MEDIA_TYPE *mt) return NULL; }
- gst_video_info_set_format(&info, format, vih->bmiHeader.biWidth, vih->bmiHeader.biHeight); + if (!gst_video_info_set_format(&info, format, vih->bmiHeader.biWidth, vih->bmiHeader.biHeight)) + { + ERR("Failed to set format.\n"); + return NULL; + } if ((caps = gst_video_info_to_caps(&info))) { /* Clear some fields that shouldn't prevent us from connecting. */