[vlc-commits] omxil: fix crash if OMX_AllocateBuffer fails (debug build only)
Thomas Guillem
git at videolan.org
Fri Oct 24 15:53:51 CEST 2014
vlc | branch: master | Thomas Guillem <tom at gllm.fr> | Fri Oct 24 12:36:59 2014 +0200| [43b98677848b7a678616251ef922275aac50a72b] | committer: Jean-Baptiste Kempf
omxil: fix crash if OMX_AllocateBuffer fails (debug build only)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=43b98677848b7a678616251ef922275aac50a72b
---
modules/codec/omxil/omxil.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index a9b496a..8512dc4 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -480,7 +480,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port)
p_port->i_port_index, 0,
p_port->definition.nBufferSize, (void*)1);
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
{
@@ -489,7 +490,8 @@ static OMX_ERRORTYPE AllocateBuffers(decoder_t *p_dec, OmxPort *p_port)
p_port->i_port_index, 0,
p_port->definition.nBufferSize);
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)
More information about the vlc-commits
mailing list