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

winegstreamer: Return NS_E_INVALID_REQUEST on WMReader Start before Open.

parent 001d78a5
......@@ -318,6 +318,13 @@ static HRESULT WINAPI WMReader_Start(IWMReader *iface,
EnterCriticalSection(&reader->reader.cs);
if (!reader->reader.wg_parser)
{
LeaveCriticalSection(&reader->reader.cs);
WARN("No stream is open; returning NS_E_INVALID_REQUEST.\n");
return NS_E_INVALID_REQUEST;
}
stop_streaming(reader);
IWMReaderCallback_OnStatus(reader->callback, WMT_STARTED, S_OK, WMT_TYPE_DWORD, (BYTE *)&zero, context);
......
......@@ -2171,6 +2171,8 @@ static void test_async_reader_streaming(void)
hr = IWMReader_Stop(reader);
ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
hr = IWMReader_Start(reader, 0, 0, 1.0, NULL);
ok(hr == NS_E_INVALID_REQUEST, "Got hr %#lx.\n", hr);
hr = IWMReaderAdvanced2_OpenStream(advanced, &stream.IStream_iface, &callback.IWMReaderCallback_iface, (void **)0xdeadbeef);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
......
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