Commit 32249e3d authored by Julian Scheel's avatar Julian Scheel Committed by 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: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent d8ad9f35
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
#include "mmal_picture.h" #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 /* 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 * 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) ...@@ -318,13 +314,12 @@ static int change_output_format(decoder_t *dec)
if (sys->opaque) { if (sys->opaque) {
sys->output->buffer_num = NUM_ACTUAL_OPAQUE_BUFFERS; sys->output->buffer_num = NUM_ACTUAL_OPAQUE_BUFFERS;
pool_size = NUM_OPAQUE_BUFFER_HEADERS;
} else { } else {
sys->output->buffer_num = __MAX(sys->output->buffer_num_recommended, sys->output->buffer_num = __MAX(sys->output->buffer_num_recommended,
MIN_NUM_BUFFERS_IN_TRANSIT); 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; sys->output->buffer_size = sys->output->buffer_size_recommended;
status = mmal_port_enable(sys->output, output_port_cb); status = mmal_port_enable(sys->output, output_port_cb);
......
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