kmssink: Fix crash on NULL dmabuf allocator pointer
Now that we are doing lazy allocation, we may endup calling _stop() before the allocator was created. As a side effect, we need to nul-check the pointer before calling it's method (_clear_cache()). https://bugzilla.gnome.org/show_bug.cgi?id=787593
This commit is contained in:
parent
ff0ccc2a11
commit
f272ddf9c7
@ -683,7 +683,8 @@ gst_kms_sink_stop (GstBaseSink * bsink)
|
||||
|
||||
self = GST_KMS_SINK (bsink);
|
||||
|
||||
gst_kms_allocator_clear_cache (self->allocator);
|
||||
if (self->allocator)
|
||||
gst_kms_allocator_clear_cache (self->allocator);
|
||||
|
||||
gst_buffer_replace (&self->last_buffer, NULL);
|
||||
gst_caps_replace (&self->allowed_caps, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user