kmssink: Ensure we have an allocator before importing

This fixes cases where the kms allocator API was called with a null
pointer.
This commit is contained in:
Nicolas Dufresne 2019-11-08 17:48:40 -05:00 committed by GStreamer Merge Bot
parent 44322b1dfc
commit a83e0036ea

View file

@ -1403,6 +1403,8 @@ gst_kms_sink_import_dmabuf (GstKMSSink * self, GstBuffer * inbuf,
return FALSE;
}
ensure_kms_allocator (self);
kmsmem = (GstKMSMemory *) gst_kms_allocator_get_cached (mems[0]);
if (kmsmem) {
GST_LOG_OBJECT (self, "found KMS mem %p in DMABuf mem %p with fb id = %d",