Commit 54590472 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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.
parent 96acd9dc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment