mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 07:57:22 +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:
parent
96acd9dc32
commit
54590472a7
|
@ -164,7 +164,7 @@ static GstMemory *wg_allocator_alloc(GstAllocator *gst_allocator, gsize size,
|
||||||
pthread_mutex_lock(&allocator->mutex);
|
pthread_mutex_lock(&allocator->mutex);
|
||||||
|
|
||||||
sample = allocator->request_sample(size, allocator->request_sample_context);
|
sample = allocator->request_sample(size, allocator->request_sample_context);
|
||||||
if (sample->max_size < size)
|
if (sample && sample->max_size < size)
|
||||||
InterlockedDecrement(&sample->refcount);
|
InterlockedDecrement(&sample->refcount);
|
||||||
else
|
else
|
||||||
memory->sample = sample;
|
memory->sample = sample;
|
||||||
|
|
Loading…
Reference in a new issue