Commit 190ebeb4 authored by Julian Scheel's avatar Julian Scheel Committed by Jean-Baptiste Kempf

mmal/vout: Use port bound pool allocation

Using mmal_port_pool_allocate/destroy adds some extra safety on maintaining
the pool lifecycle in relation to the component lifecycle. Furthermore it is a
prerequisite to use zerocopy mode for ports.
Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b2cf46dd
...@@ -342,7 +342,7 @@ static void Close(vlc_object_t *object) ...@@ -342,7 +342,7 @@ static void Close(vlc_object_t *object)
mmal_component_disable(sys->component); mmal_component_disable(sys->component);
if (sys->pool) if (sys->pool)
mmal_pool_destroy(sys->pool); mmal_port_pool_destroy(sys->input, sys->pool);
if (sys->component) if (sys->component)
mmal_component_release(sys->component); mmal_component_release(sys->component);
...@@ -487,7 +487,8 @@ static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count) ...@@ -487,7 +487,8 @@ static picture_pool_t *vd_pool(vout_display_t *vd, unsigned count)
} }
sys->num_buffers = count; sys->num_buffers = count;
sys->pool = mmal_pool_create(sys->num_buffers, sys->input->buffer_size); sys->pool = mmal_port_pool_create(sys->input, sys->num_buffers,
sys->input->buffer_size);
if (!sys->pool) { if (!sys->pool) {
msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32, msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32,
count, sys->input->buffer_size); count, sys->input->buffer_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment