mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
omxbufferpool: fix dmabuf import
When importing dmabuf from downstream, we want the allocator to be in OTHER_POOL mode despite output_mode being DMABUF. So check first if other_pool is set before checking for pool's output_mode.
This commit is contained in:
parent
8d4d697a58
commit
7cd929bc87
1 changed files with 6 additions and 3 deletions
|
@ -157,11 +157,14 @@ gst_omx_buffer_pool_start (GstBufferPool * bpool)
|
|||
|
||||
g_assert (pool->port->buffers);
|
||||
|
||||
if (pool->output_mode == GST_OMX_BUFFER_MODE_DMABUF)
|
||||
mode = GST_OMX_ALLOCATOR_FOREIGN_MEM_DMABUF;
|
||||
else if (pool->other_pool)
|
||||
if (pool->other_pool)
|
||||
/* Importing buffers from downstream, either normal or dmabuf ones */
|
||||
mode = GST_OMX_ALLOCATOR_FOREIGN_MEM_OTHER_POOL;
|
||||
else if (pool->output_mode == GST_OMX_BUFFER_MODE_DMABUF)
|
||||
/* Exporting dmabuf */
|
||||
mode = GST_OMX_ALLOCATOR_FOREIGN_MEM_DMABUF;
|
||||
else
|
||||
/* Exporting normal buffers */
|
||||
mode = GST_OMX_ALLOCATOR_FOREIGN_MEM_NONE;
|
||||
|
||||
if (!gst_omx_allocator_configure (pool->allocator, min, mode))
|
||||
|
|
Loading…
Reference in a new issue