[vlc-devel] [PATCH 2/2] iomx-dr: fix crash if anwpriv.connect fails
Thomas Guillem
tom at gllm.fr
Fri Oct 24 17:41:14 CEST 2014
---
modules/codec/omxil/omxil.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 976f146..aa95165 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -2087,7 +2087,12 @@ static void HwBuffer_Init( decoder_t *p_dec, OmxPort *p_port )
msg_Warn( p_dec, "winFromSurface failed" );
goto error;
}
- p_port->p_hwbuf->anwpriv.connect( p_port->p_hwbuf->window );
+ if( p_port->p_hwbuf->anwpriv.connect( p_port->p_hwbuf->window ) != 0 ) {
+ msg_Warn( p_dec, "connect failed" );
+ p_port->p_hwbuf->native_window.winRelease( p_port->p_hwbuf->window );
+ p_port->p_hwbuf->window = NULL;
+ goto error;
+ }
omx_error = pf_enable_graphic_buffers( p_port->omx_handle,
p_port->i_port_index, OMX_TRUE );
--
2.1.0
More information about the vlc-devel
mailing list