]> git.sesse.net Git - vlc/commitdiff
* modules/codec/libmpeg2.c: fixed a crasher with invalid pictures
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 2 Jun 2003 12:42:15 +0000 (12:42 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 2 Jun 2003 12:42:15 +0000 (12:42 +0000)
* modules/gui/macosx/playlist.m: better fix for playlists on 10.1

modules/codec/libmpeg2.c
modules/gui/macosx/playlist.m

index a8a8ffbfa328ab604b68872faad2cc9f30cd7c37..8e161de9afefecd5746a26a23c0a91e8daca61e9 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.18 2003/05/24 13:05:55 massiot Exp $
+ * $Id: libmpeg2.c,v 1.19 2003/06/02 12:42:15 hartman Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -367,8 +367,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
             buf[0] = buf[1] = buf[2] = NULL;
 
             msg_Warn( p_dec->p_fifo, "invalid picture encountered" );
-            if ( (p_dec->p_info->current_picture->flags & PIC_MASK_CODING_TYPE)
-                  != B_CODING_TYPE )
+            if ( ( p_dec->p_info->current_picture == NULL ) || 
+               ( ( p_dec->p_info->current_picture->flags & PIC_MASK_CODING_TYPE)
+                  != B_CODING_TYPE ) )
             {
                 vout_SynchroReset( p_dec->p_synchro );
             }
index 5c2400fd697a2076f3f18d54cc3daa0d7f5f7b49..33f0088c01bf0708db32efece0d5a62d72c79f73 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.24 2003/05/22 14:25:34 hartman Exp $
+ * $Id: playlist.m,v 1.25 2003/06/02 12:42:15 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Derk-Jan Hartman <thedj@users.sourceforge.net>
     float f_origin_y = NSMaxY( o_rect );
     int i_row = o_rect.origin.y / f_height;
     
-    if( [o_striped_row_color respondsTo:@selector( alternateSelectedControlColor ) ] )
-    {
-        [super highlightSelectionInClipRect:o_rect];
-        return;
-    }
-    
     if ( i_row % 2 == 0 )
     {
         i_row++;
     {
         o_striped_row_color = [[[NSColor alternateSelectedControlColor]
                                 highlightWithLevel: 0.90] retain];
+        
+        if ( o_striped_row_color == nil )
+        {
+            /* OSX 10.1 and before ain't that smart ;) */
+            o_striped_row_color = [[NSColor whiteColor] retain];
+        }
     }
     [o_striped_row_color set];