[vlc-devel] [PATCH] Crystalhd: Fix segfault in DecodeBlock function, when pp_block == NULL
Philip Höhlein
philip.hoehlein at googlemail.com
Wed May 18 15:33:03 CEST 2016
This patch will fix a segfault when trying to play crystalhd codec on vlc
3.0.0.
diff --git a/modules/codec/crystalhd.c b/modules/codec/crystalhd.c
index 88f003c..44bc250 100644
--- a/modules/codec/crystalhd.c
+++ b/modules/codec/crystalhd.c
@@ -431,7 +431,7 @@ static BC_STATUS ourCallback(void *shnd, uint32_t
width, uint32_t height, uint32
static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
decoder_sys_t *p_sys = p_dec->p_sys;
- block_t *p_block;
+ block_t *p_block = NULL;
BC_DTS_PROC_OUT proc_out;
BC_DTS_STATUS driver_stat;
@@ -440,7 +440,9 @@ static picture_t *DecodeBlock( decoder_t *p_dec,
block_t **pp_block )
if( BC_FUNC_PSYS(DtsGetDriverStatus)( p_sys->bcm_handle, &driver_stat
) != BC_STS_SUCCESS )
return NULL;
- p_block = *pp_block;
+ if( pp_block )
+ p_block = *pp_block;
+
if( p_block )
{
if( ( p_block->i_flags & (BLOCK_FLAG_CORRUPTED) ) == 0 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160518/59c3277a/attachment.html>
More information about the vlc-devel
mailing list