[vlc-devel] [PATCH 2/4] codec/schroedinger: fix segfault when schro_decoder_pull returns NULL
davidf+nntp at woaf.net
davidf+nntp at woaf.net
Thu May 7 14:47:36 CEST 2009
From: David Flynn <davidf at rd.bbc.co.uk>
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
modules/codec/schroedinger.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index cf81333..d380280 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -358,12 +358,12 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
case SCHRO_DECODER_OK: {
SchroTag *p_tag = schro_decoder_get_picture_tag( p_sys->p_schro );
p_schroframe = schro_decoder_pull( p_sys->p_schro );
- if( !p_schroframe->priv )
+ if( !p_schroframe || !p_schroframe->priv )
{
/* frame can't be one that was allocated by us
* -- no private data: discard */
if( p_tag ) schro_tag_free( p_tag );
- schro_frame_unref( p_schroframe );
+ if( p_schroframe ) schro_frame_unref( p_schroframe );
break;
}
p_pic = ((struct picture_free_t*) p_schroframe->priv)->p_pic;
--
1.5.6.5
More information about the vlc-devel
mailing list