]> git.sesse.net Git - vlc/commitdiff
Fixed a potential segfault.
authorChristophe Massiot <massiot@videolan.org>
Tue, 10 Jun 2003 11:12:38 +0000 (11:12 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 10 Jun 2003 11:12:38 +0000 (11:12 +0000)
modules/codec/libmpeg2.c

index dcfeb0ef8ce9efcac62edce20f4d1d4cb8aead98..a27374e89e886a434814e1991128b0dffeff435d 100755 (executable)
@@ -2,7 +2,7 @@
  * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.20 2003/06/09 00:33:34 massiot Exp $
+ * $Id: libmpeg2.c,v 1.21 2003/06/10 11:12:38 massiot Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -182,7 +182,8 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
                 if( p_dec->p_pes->b_discontinuity && p_dec->p_synchro )
                 {
                     vout_SynchroReset( p_dec->p_synchro );
-                    if ( p_dec->p_info->current_fbuf != NULL )
+                    if ( p_dec->p_info->current_fbuf != NULL
+                          && p_dec->p_info->current_fbuf->id != NULL )
                     {
                         p_dec->b_garbage_pic = 1;
                         p_pic = p_dec->p_info->current_fbuf->id;