Commit 877413ab authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* modules/codec/libmpeg2.c: fixed a crasher with invalid pictures

* modules/gui/macosx/playlist.m: better fix for playlists on 10.1
parent a85ddccd
......@@ -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 );
}
......
......@@ -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>
......@@ -117,12 +117,6 @@
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++;
......@@ -137,6 +131,12 @@
{
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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment