mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
winegstreamer: Reject incompatible output types in MPEG layer-3 decoder.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
This commit is contained in:
parent
f114e2d354
commit
1d636da205
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue