From 6b19bea6e1a0fb0f0c9cb9f0d09e9da6727a0007 Mon Sep 17 00:00:00 2001 From: rtognimp Date: Wed, 14 Apr 2004 20:50:15 +0000 Subject: Fix segfault if EDL is used without video Based on a patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12208 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 7b67c26038..34e8cdac99 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2467,6 +2467,10 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) #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 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still) next_edl_record = next_edl_record->next; } } + } } #endif -- cgit v1.2.3