mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue