* video.c: with mpeg4 stream, we try to decode a picture only when we have
authorLaurent Aimar <fenrir@videolan.org>
Wed, 18 Dec 2002 16:31:25 +0000 (16:31 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 18 Dec 2002 16:31:25 +0000 (16:31 +0000)
received an header (vol). (It prevents some segfaults with mpeg4 streaming).

modules/codec/ffmpeg/video.c

index 722c2f1..fb401c4 100644 (file)
@@ -2,7 +2,7 @@
  * video.c: video decoder using ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video.c,v 1.13 2002/12/14 18:57:34 fenrir Exp $
+ * $Id: video.c,v 1.14 2002/12/18 16:31:25 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -514,6 +514,11 @@ void  E_( DecodeThread_Video )( vdec_thread_t *p_vdec )
         p_vdec->p_context->hurry_up = 0;
     }
 
+    if( !p_vdec->p_context->width || !p_vdec->p_context->height )
+    {
+        p_vdec->p_context->hurry_up = 5;
+    }
+
     do
     {
         input_ExtractPES( p_vdec->p_fifo, &p_pes );