From c89b54fe7867568f85ccc3b8660bbbd839659fcd Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 31 Jul 2018 15:04:33 +0200 Subject: omxvideodec: don't import non-dmabuf when dec is in dmabuf mode Fix 'omxh264dec ! videocrop' pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=796918 --- omx/gstomxvideodec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index fb04ea2..cdf6300 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -707,6 +707,13 @@ gst_omx_try_importing_buffer (GstOMXVideoDec * self, GstBufferPool * pool, goto out; } + if (self->dmabuf && !gst_is_dmabuf_memory (mem)) { + GST_INFO_OBJECT (self, + "%d-th buffer doesn't contain dmabuf while the decoder is in dmabuf mode", + i); + goto out; + } + *frame = g_slice_new0 (GstVideoFrame); is_mapped = gst_video_frame_map (*frame, v_info, buffer, flags); -- cgit v1.2.1