mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 22:49:03 +00:00
qedit: Do not force the sample to be freed in SampleGrabber_callback().
Remove a work around that causes a crash in Unravel Two. There is a callback in Unravel Two that appears to add a reference to a IMediaSample, which this workaround treats as a leak and releases. However, the application also later releases the reference itself, causing a use-after-free. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51616 Signed-off-by: Brendan McGrath <brendan@redmandi.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2f280d0dda
commit
1113f42aa7
|
@ -164,9 +164,6 @@ static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sa
|
||||||
if (ref)
|
if (ref)
|
||||||
{
|
{
|
||||||
ERR("(%p) Callback referenced sample %p by %lu\n", This, sample, ref);
|
ERR("(%p) Callback referenced sample %p by %lu\n", This, sample, ref);
|
||||||
/* ugly as hell but some apps are sooo buggy */
|
|
||||||
while (ref--)
|
|
||||||
IMediaSample_Release(sample);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ static void test_samplegrabber(void)
|
||||||
ok(samplecb_called == TRUE, "SampleCB should have been called\n");
|
ok(samplecb_called == TRUE, "SampleCB should have been called\n");
|
||||||
|
|
||||||
refcount = IUnknown_Release(&my_sample.sample);
|
refcount = IUnknown_Release(&my_sample.sample);
|
||||||
todo_wine ok(!refcount, "Got unexpected refcount %ld.\n", refcount);
|
ok(!refcount, "Got unexpected refcount %ld.\n", refcount);
|
||||||
|
|
||||||
IMemInputPin_Release(inpin);
|
IMemInputPin_Release(inpin);
|
||||||
IPin_Release(pin);
|
IPin_Release(pin);
|
||||||
|
|
Loading…
Reference in a new issue