]> git.sesse.net Git - vlc/commitdiff
* Quick patch to avoid a segfault when arbitrarily seeking the stream.
authorSam Hocevar <sam@videolan.org>
Tue, 13 Feb 2001 06:31:05 +0000 (06:31 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 13 Feb 2001 06:31:05 +0000 (06:31 +0000)
  Meuuh: you probably have a better solution for this ; I simply don't
  know the video decoder well enough to do it myself.

plugins/motion/vdec_motion_common.c

index c622eaca8cddf7ac0629efdfa4519b403b135341..894aa98bd361151c1249c0955de0f7ebab6c83ce 100644 (file)
@@ -2,7 +2,7 @@
  * vdec_motion_common.c : common motion compensation routines common
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vdec_motion_common.c,v 1.1 2001/01/18 05:13:22 sam Exp $
+ * $Id: vdec_motion_common.c,v 1.2 2001/02/13 06:31:05 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Jean-Marc Dressler <polux@via.ecp.fr>
@@ -202,6 +202,11 @@ static __inline__ void Motion420(
     /* Temporary variables to avoid recalculating things twice */
     int     i_source_offset, i_dest_offset, i_c_height, i_c_select;
 
+    if( p_source == NULL )
+    {
+        return;
+    }
+
     i_source_offset = (p_mb->i_l_x + (i_mv_x >> 1))
                        + (p_mb->i_motion_l_y + i_offset
                          + b_source_field)