[vlc-commits] mmal/codec: Remove buffer header count hack

Julian Scheel git at videolan.org
Tue Jan 20 07:08:05 CET 2015


vlc | branch: master | Julian Scheel <julian at jusst.de> | Mon Jan 19 11:30:25 2015 +0100| [32249e3dba2e06d485ec3400785014683a19c9ec] | committer: Rémi Denis-Courmont

mmal/codec: Remove buffer header count hack

This hack is not required anymore as the buffer header lifecycle is properly
handled now. This ensures that the codec only sees buffers which are ready for
reuse and avoids some misbehaviour of the codec.

Signed-off-by: Julian Scheel <julian at jusst.de>
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 modules/hw/mmal/codec.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 6ab0055..0931b59 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -38,10 +38,6 @@
 
 #include "mmal_picture.h"
 
-/* We need a smaller size of available buffer headers than actual buffers
- * in the decoder to avoid stalls. MMAL seems a a bit picky here */
-#define NUM_OPAQUE_BUFFER_HEADERS (NUM_ACTUAL_OPAQUE_BUFFERS - 2)
-
 /* These are only required when combined with image_fx filter. But as they
  * won't do much harm besides using a few MB GPU memory, keep them always on
  */
@@ -318,13 +314,12 @@ static int change_output_format(decoder_t *dec)
 
     if (sys->opaque) {
         sys->output->buffer_num = NUM_ACTUAL_OPAQUE_BUFFERS;
-        pool_size = NUM_OPAQUE_BUFFER_HEADERS;
     } else {
         sys->output->buffer_num = __MAX(sys->output->buffer_num_recommended,
                 MIN_NUM_BUFFERS_IN_TRANSIT);
-        pool_size = sys->output->buffer_num;
     }
 
+    pool_size = sys->output->buffer_num;
     sys->output->buffer_size = sys->output->buffer_size_recommended;
 
     status = mmal_port_enable(sys->output, output_port_cb);



More information about the vlc-commits mailing list