[vlc-commits] Crystalhd: Fix segfault in DecodeBlock function, when pp_block == NULL
Philip Höhlein
git at videolan.org
Wed May 18 18:53:10 CEST 2016
vlc | branch: master | Philip Höhlein <philip.hoehlein at googlemail.com> | Wed May 18 15:33:03 2016 +0200| [725cdc99c958d976b2bfd02f17040f46f181b87d] | committer: Jean-Baptiste Kempf
Crystalhd: Fix segfault in DecodeBlock function, when pp_block == NULL
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=725cdc99c958d976b2bfd02f17040f46f181b87d
---
modules/codec/crystalhd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 )
More information about the vlc-commits
mailing list