1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +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:
Brendan McGrath 2022-07-17 12:38:09 +10:00 committed by Alexandre Julliard
parent 2f280d0dda
commit 1113f42aa7
2 changed files with 1 additions and 4 deletions

View File

@ -164,9 +164,6 @@ static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sa
if (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;

View File

@ -1094,7 +1094,7 @@ static void test_samplegrabber(void)
ok(samplecb_called == TRUE, "SampleCB should have been called\n");
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);
IPin_Release(pin);