winegstreamer: Commit allocator on pause in MPEG audio decoder.
Signed-off-by: Anton Baskanov <baskanov@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1933981760
commit
f91f434835
|
@ -1005,7 +1005,7 @@ static void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control,
|
|||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
|
||||
hr = IMemAllocator_GetBuffer(testsink->sink.pAllocator, &sample, NULL, NULL, 0);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
ok(hr == S_OK, "Got hr %#lx.\n", hr);
|
||||
if (hr == S_OK)
|
||||
IMediaSample_Release(sample);
|
||||
|
||||
|
|
|
@ -66,10 +66,37 @@ static void transform_destroy(struct strmbase_filter *iface)
|
|||
free(filter);
|
||||
}
|
||||
|
||||
static HRESULT transform_init_stream(struct strmbase_filter *iface)
|
||||
{
|
||||
struct transform *filter = impl_from_strmbase_filter(iface);
|
||||
HRESULT hr;
|
||||
|
||||
if (filter->source.pin.peer)
|
||||
{
|
||||
hr = IMemAllocator_Commit(filter->source.pAllocator);
|
||||
if (FAILED(hr))
|
||||
ERR("Failed to commit allocator, hr %#lx.\n", hr);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT transform_cleanup_stream(struct strmbase_filter *iface)
|
||||
{
|
||||
struct transform *filter = impl_from_strmbase_filter(iface);
|
||||
|
||||
if (filter->source.pin.peer)
|
||||
IMemAllocator_Decommit(filter->source.pAllocator);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = transform_get_pin,
|
||||
.filter_destroy = transform_destroy,
|
||||
.filter_init_stream = transform_init_stream,
|
||||
.filter_cleanup_stream = transform_cleanup_stream,
|
||||
};
|
||||
|
||||
static HRESULT transform_sink_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
|
||||
|
|
Loading…
Reference in New Issue