This can happen with asynchronous decoding, such as with the VA-API decodebin plugin for H264.
This fixes the mf transform tests crashing when VA-API plugins are used.
From: Rémi Bernon rbernon@codeweavers.com
This can happen with asynchronous decoding, such as with the VA-API decodebin plugin for H264. --- dlls/winegstreamer/wg_allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/wg_allocator.c b/dlls/winegstreamer/wg_allocator.c index 5b2c48dcf77..784677e2b2d 100644 --- a/dlls/winegstreamer/wg_allocator.c +++ b/dlls/winegstreamer/wg_allocator.c @@ -164,7 +164,7 @@ static GstMemory *wg_allocator_alloc(GstAllocator *gst_allocator, gsize size, pthread_mutex_lock(&allocator->mutex);
sample = allocator->request_sample(size, allocator->request_sample_context); - if (sample->max_size < size) + if (sample && sample->max_size < size) InterlockedDecrement(&sample->refcount); else memory->sample = sample;
This merge request was approved by Zebediah Figura.