qedit/samplegrabber: Don't overwrite the filter media type in sample_grabber_sink_connect().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-07 23:51:52 -06:00 committed by Alexandre Julliard
parent 5608682dc9
commit a5f547420f
1 changed files with 1 additions and 4 deletions

View File

@ -254,7 +254,7 @@ SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MED
if (!filter->sink.pin.peer) if (!filter->sink.pin.peer)
return VFW_E_NOT_CONNECTED; return VFW_E_NOT_CONNECTED;
CopyMediaType(mt, &filter->filter_mt); CopyMediaType(mt, &filter->sink.pin.mt);
return S_OK; return S_OK;
} }
@ -519,9 +519,6 @@ static HRESULT sample_grabber_sink_connect(struct strmbase_sink *iface,
&& !IsEqualGUID(&filter->filter_mt.formattype, &mt->formattype)) && !IsEqualGUID(&filter->filter_mt.formattype, &mt->formattype))
return VFW_E_TYPE_NOT_ACCEPTED; return VFW_E_TYPE_NOT_ACCEPTED;
FreeMediaType(&filter->filter_mt);
CopyMediaType(&filter->filter_mt, mt);
return S_OK; return S_OK;
} }