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
This commit is contained in:
Guillaume Desmottes 2018-07-31 15:04:33 +02:00
parent be5ec66a84
commit c89b54fe78

View file

@ -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);