Changeset 6e08e54f8cdabaeab81846b3679d053669088867

Show
Ignore:
Timestamp:
05/12/03 15:58:03 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1070636283 +0000
git-parent:

[222d4881482eba8445e38bbfb9a702ef1044409d]

git-author:
Gildas Bazin <gbazin@videolan.org> 1070636283 +0000
Message:

* modules/codec/libmpeg2.c: fixed a couple of crashes on bad files.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/libmpeg2.c

    r89fd537 r6e08e54  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: libmpeg2.c,v 1.35 2003/11/24 23:22:01 gbazin Exp $ 
     5 * $Id: libmpeg2.c,v 1.36 2003/12/05 14:58:03 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    179179            } 
    180180 
    181             if( p_block->b_discontinuity && p_sys->p_synchro 
    182                 && p_sys->p_info->sequence->width != (unsigned)-1 ) 
     181            if( p_block->b_discontinuity && p_sys->p_synchro && 
     182                p_sys->p_info->sequence && 
     183                p_sys->p_info->sequence->width != (unsigned)-1 ) 
    183184            { 
    184185                vout_SynchroReset( p_sys->p_synchro ); 
     
    421422           PIC_MASK_CODING_TYPE) != B_CODING_TYPE ) ) 
    422423            { 
    423                 vout_SynchroReset( p_sys->p_synchro ); 
     424                if( p_sys->p_synchro ) vout_SynchroReset( p_sys->p_synchro ); 
    424425            } 
    425426            mpeg2_skip( p_sys->p_mpeg2dec, 1 ); 
     
    431432                p_sys->b_garbage_pic = 1; 
    432433                p_pic = p_sys->p_info->current_fbuf->id; 
     434            } 
     435            else if( !p_sys->p_info->sequence ) 
     436            { 
     437                break; 
    433438            } 
    434439            else