[vlc-commits] mmal/deinterlace: Use default allocator for mmal pool

Julian Scheel git at videolan.org
Thu Sep 4 18:22:26 CEST 2014


vlc | branch: master | Julian Scheel <julian at jusst.de> | Thu Sep  4 12:55:11 2014 +0200| [edbf269311d5c80aac05f7612229078b9e9d60d8] | committer: Jean-Baptiste Kempf

mmal/deinterlace: Use default allocator for mmal pool

The port agnostic allocator helpers in mmal leak memory (see
https://github.com/raspberrypi/firmware/issues/310). As there is no benefit
using them instead of the default allocator in our case anyway, switch to the
default allocator, which avoids memory leakage on pool destruction.

Signed-off-by: Julian Scheel <julian at jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=edbf269311d5c80aac05f7612229078b9e9d60d8
---

 modules/hw/mmal/deinterlace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index 8b3dba5..58fcbb9 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -259,10 +259,8 @@ static int Open(filter_t *filter)
         goto out;
     }
 
-    sys->output_pool = mmal_pool_create_with_allocator(sys->output->buffer_num,
-            sys->output->buffer_size, sys->output,
-            (mmal_pool_allocator_alloc_t)mmal_port_payload_alloc,
-            (mmal_pool_allocator_free_t)mmal_port_payload_free);
+    sys->output_pool = mmal_pool_create(sys->output->buffer_num,
+            sys->output->buffer_size);
     if (!sys->output_pool) {
         msg_Err(filter, "Failed to create MMAL pool for %u buffers of size %"PRIu32,
                         sys->output->buffer_num, sys->output->buffer_size);



More information about the vlc-commits mailing list