Commit ce647555 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

wmvcore/tests: Fix OnStreamSample stream number checks.

parent debe249a
...@@ -2101,6 +2101,7 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced ...@@ -2101,6 +2101,7 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced
{ {
struct callback *callback = impl_from_IWMReaderCallbackAdvanced(iface); struct callback *callback = impl_from_IWMReaderCallbackAdvanced(iface);
struct teststream *stream = callback->stream; struct teststream *stream = callback->stream;
DWORD output = 2 - stream_number;
if (winetest_debug > 1) if (winetest_debug > 1)
trace("%lu: %04lx: IWMReaderCallbackAdvanced::OnStreamSample(stream %u, pts %I64u, duration %I64u, flags %#lx)\n", 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 ...@@ -2118,15 +2119,15 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced
callback->last_pts = pts; callback->last_pts = pts;
} }
if (!callback->output_tid[stream_number - 1]) if (!callback->output_tid[output])
callback->output_tid[stream_number - 1] = GetCurrentThreadId(); callback->output_tid[output] = GetCurrentThreadId();
else 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 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) if (stream)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment