1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-05 09:18:56 +00:00

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.
This commit is contained in:
Rémi Bernon 2022-09-21 11:39:34 +02:00 committed by Alexandre Julliard
parent 96acd9dc32
commit 54590472a7

View File

@ -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;