# HG changeset patch # User rtognimp # Date 1081975815 0 # Node ID 3c148bdd86d9635f866ec8086b5e682137546e49 # Parent d572c605f665ebf72b6ca3ae3e0b6c3813894910 Fix segfault if EDL is used without video Based on a patch by adland diff -r d572c605f665 -r 3c148bdd86d9 mplayer.c --- a/mplayer.c Wed Apr 14 20:45:26 2004 +0000 +++ b/mplayer.c Wed Apr 14 20:50:15 2004 +0000 @@ -2467,6 +2467,10 @@ #ifdef USE_EDL if( next_edl_record->next ) { // Are we (still?) doing EDL? + if ( !sh_video ) { + mp_msg( MSGT_CPLAYER, MSGL_ERR, "Cannot use edit list without video. EDL disabled.\n" ); + next_edl_record->next = NULL; + } else { if( sh_video->pts >= next_edl_record->start_sec ) { if( next_edl_record->action == EDL_SKIP ) { osd_function = OSD_FFW; @@ -2486,6 +2490,7 @@ next_edl_record = next_edl_record->next; } } + } } #endif