]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/video.c: fixed crash when disabling post-processing with video...
authorGildas Bazin <gbazin@videolan.org>
Sun, 8 Feb 2004 12:09:50 +0000 (12:09 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 8 Feb 2004 12:09:50 +0000 (12:09 +0000)
modules/codec/ffmpeg/video.c

index dfb5a3707218ba365980574168df3b743b827e19..8c4467cb85caa3b9240ca4ee3caafcf20c4a82c1 100644 (file)
@@ -2,7 +2,7 @@
  * video.c: video decoder using the ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.62 2004/01/25 21:39:37 gbazin Exp $
+ * $Id: video.c,v 1.63 2004/02/08 12:09:50 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -518,7 +518,8 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
             continue;
         }
 
-        if( !p_sys->b_direct_rendering || p_sys->b_pp )
+        if( !p_sys->b_direct_rendering ||
+            p_sys->b_pp || !p_sys->p_ff_pic->opaque )
         {
             /* Get a new picture */
             p_pic = ffmpeg_NewPictBuf( p_dec, p_sys->p_context );
@@ -689,6 +690,7 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
     else p_ff_pic->pts = 0;
 
     p_sys->input_pts = p_sys->input_dts = 0;
+    p_ff_pic->opaque = 0;
 
     /* Not much to do in indirect rendering mode */
     if( !p_sys->b_direct_rendering || p_sys->b_pp )