Commit 43b98677 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

omxil: fix crash if OMX_AllocateBuffer fails (debug build only)

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ab4c04f2
...@@ -480,7 +480,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port) ...@@ -480,7 +480,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port)
p_port->i_port_index, 0, p_port->i_port_index, 0,
p_port->definition.nBufferSize, (void*)1); p_port->definition.nBufferSize, (void*)1);
OMX_DBG( "OMX_UseBuffer(%d) %p, %p", def->eDir, OMX_DBG( "OMX_UseBuffer(%d) %p, %p", def->eDir,
p_port->pp_buffers[i], p_port->pp_buffers[i]->pBuffer ); p_port->pp_buffers[i], p_port->pp_buffers[i] ?
p_port->pp_buffers[i]->pBuffer : NULL );
} }
else else
{ {
...@@ -489,7 +490,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port) ...@@ -489,7 +490,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port)
p_port->i_port_index, 0, p_port->i_port_index, 0,
p_port->definition.nBufferSize); p_port->definition.nBufferSize);
OMX_DBG( "OMX_AllocateBuffer(%d) %p, %p", def->eDir, OMX_DBG( "OMX_AllocateBuffer(%d) %p, %p", def->eDir,
p_port->pp_buffers[i], p_port->pp_buffers[i]->pBuffer ); p_port->pp_buffers[i], p_port->pp_buffers[i] ?
p_port->pp_buffers[i]->pBuffer : NULL );
} }
if(omx_error != OMX_ErrorNone) if(omx_error != OMX_ErrorNone)
......
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