[vlc-devel] [PATCH 13/14] mmal/vout: Use port bound pool allocation

Julian Scheel julian at jusst.de
Wed Jun 3 09:50:38 CEST 2015


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: Julian Scheel <julian at jusst.de>
---
 modules/hw/mmal/vout.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index ecfcd4d..24f40a4 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -342,7 +342,7 @@ static void Close(vlc_object_t *object)
         mmal_component_disable(sys->component);
 
     if (sys->pool)
-        mmal_pool_destroy(sys->pool);
+        mmal_port_pool_destroy(sys->input, sys->pool);
 
     if (sys->component)
         mmal_component_release(sys->component);
@@ -487,7 +487,8 @@ static picture_pool_t *vd_pool(vout_display_t *vd, unsigned 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) {
         msg_Err(vd, "Failed to create MMAL pool for %u buffers of size %"PRIu32,
                         count, sys->input->buffer_size);
-- 
2.4.0





More information about the vlc-devel mailing list