Module: wine Branch: master Commit: ce64755578de5f9471dedaee914663a9ed089fb3 URL: https://gitlab.winehq.org/wine/wine/-/commit/ce64755578de5f9471dedaee914663a...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed Nov 16 10:39:47 2022 +0100
wmvcore/tests: Fix OnStreamSample stream number checks.
---
dlls/wmvcore/tests/wmvcore.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index f3d30772282..f8009735af2 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -2101,6 +2101,7 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced { struct callback *callback = impl_from_IWMReaderCallbackAdvanced(iface); struct teststream *stream = callback->stream; + DWORD output = 2 - stream_number;
if (winetest_debug > 1) trace("%lu: %04lx: IWMReaderCallbackAdvanced::OnStreamSample(stream %u, pts %I64u, duration %I64u, flags %#lx)\n", @@ -2118,15 +2119,15 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced callback->last_pts = pts; }
- if (!callback->output_tid[stream_number - 1]) - callback->output_tid[stream_number - 1] = GetCurrentThreadId(); + if (!callback->output_tid[output]) + callback->output_tid[output] = GetCurrentThreadId(); else - ok(callback->output_tid[stream_number - 1] == GetCurrentThreadId(), "got wrong thread\n"); + ok(callback->output_tid[output] == GetCurrentThreadId(), "got wrong thread\n");
- if (callback->dedicated_threads && callback->output_tid[2 - stream_number]) + if (callback->dedicated_threads && callback->output_tid[1 - output]) { todo_wine - ok(callback->output_tid[2 - stream_number] != GetCurrentThreadId(), "got wrong thread\n"); + ok(callback->output_tid[1 - output] != GetCurrentThreadId(), "got wrong thread\n"); }
if (stream)