Commit 5d0d9dec authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

omxil: Update the number of buffers when reconfiguring

On OpenMAX devices supported earlier, the number of buffers has
stayed the same after reconfiguring, but on the Nexus One, the
number changes.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d4f0c5f1
......@@ -984,6 +984,16 @@ static OMX_ERRORTYPE PortReconfigure(decoder_t *p_dec, OmxPort *p_port)
CHECK_ERROR(omx_error, "OMX_CommandPortEnable on %i failed (%x)",
(int)p_port->i_port_index, omx_error );
if (p_port->definition.nBufferCountActual > p_port->i_buffers) {
free(p_port->pp_buffers);
p_port->pp_buffers = malloc(p_port->definition.nBufferCountActual * sizeof(OMX_BUFFERHEADERTYPE*));
if(!p_port->pp_buffers)
{
omx_error = OMX_ErrorInsufficientResources;
CHECK_ERROR(omx_error, "memory allocation failed");
}
}
p_port->i_buffers = p_port->definition.nBufferCountActual;
for(i = 0; i < p_port->i_buffers; i++)
{
if(0 && p_port->b_direct)
......
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