Rémi Bernon : winegstreamer: Avoid accessing NULL pointer if transform didn't provide a sample.
Module: wine Branch: master Commit: 54590472a7f546926b2fce37fb3e7525cd3d7c45 URL: https://gitlab.winehq.org/wine/wine/-/commit/54590472a7f546926b2fce37fb3e752... Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Sep 21 11:39:34 2022 +0200 winegstreamer: Avoid accessing NULL pointer if transform didn't provide a sample. 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;
participants (1)
-
Alexandre Julliard