]> git.sesse.net Git - vlc/commitdiff
* cinepak.c : initialize picture to black.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 15 Oct 2002 01:50:24 +0000 (01:50 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 15 Oct 2002 01:50:24 +0000 (01:50 +0000)
modules/codec/cinepak/cinepak.c

index ba3a12d668185926ff3987019a10dde7c932d887..50456c9bd41db81c82bff06529f868c2b0fb0769 100644 (file)
@@ -2,7 +2,7 @@
  * cinepak.c: cinepak video decoder 
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: cinepak.c,v 1.3 2002/08/12 09:34:15 sam Exp $
+ * $Id: cinepak.c,v 1.4 2002/10/15 01:50:24 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -526,6 +526,9 @@ int cinepak_decode_frame( cinepak_context_t *p_context,
         {
             p_context->p_pix[i] = malloc( p_context->i_stride[i] * 
                                           p_context->i_lines[i] );
+            /* Set it to all black */
+            memset( p_context->p_pix[i], ( i == 0 ) ? 0 : 128 ,
+                    p_context->i_stride[i] * p_context->i_lines[i] );
         }
     }