[vlc-devel] commit: codec/schroedinger: fix segfault when schro_decoder_pull returns NULL (David Flynn )
git version control
git at videolan.org
Thu May 7 17:42:05 CEST 2009
vlc | branch: master | David Flynn <davidf at rd.bbc.co.uk> | Thu May 7 12:47:36 2009 +0000| [2ef4b5ef59e5d7b11f550a35d06fb27c17395ed6] | committer: Rémi Denis-Courmont
codec/schroedinger: fix segfault when schro_decoder_pull returns NULL
Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ef4b5ef59e5d7b11f550a35d06fb27c17395ed6
---
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;
More information about the vlc-devel
mailing list