Commit 1d636da2 authored by Anton Baskanov's avatar Anton Baskanov Committed by Alexandre Julliard

winegstreamer: Reject incompatible output types in MPEG layer-3 decoder.

parent f114e2d3
......@@ -767,7 +767,7 @@ static void test_media_types(void)
init_pcm_mt(&mt, &format, 1, 32000, 16);
hr = IPin_QueryAccept(pin, &mt);
todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin);
......@@ -928,12 +928,12 @@ static void test_connect_pin(void)
init_pcm_mt(&req_mt, &req_format, 1, 32000, 16);
req_mt.majortype = GUID_NULL;
hr = IPin_QueryAccept(source, &req_mt);
todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
init_pcm_mt(&req_mt, &req_format, 1, 32000, 16);
req_mt.subtype = GUID_NULL;
hr = IPin_QueryAccept(source, &req_mt);
todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
......
......@@ -754,6 +754,13 @@ static HRESULT mpeg_layer3_decoder_sink_query_accept(struct transform *filter, c
static HRESULT mpeg_layer3_decoder_source_query_accept(struct transform *filter, const AM_MEDIA_TYPE *mt)
{
if (!filter->sink.pin.peer)
return S_FALSE;
if (!IsEqualGUID(&mt->majortype, &MEDIATYPE_Audio)
|| !IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_PCM))
return S_FALSE;
return S_OK;
}
......
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