[MPlayer-dev-eng] [PATCH] prevent segfault -edl option on non video file

adland adland123 at yahoo.com
Sun Apr 4 06:13:24 CEST 2004


Patch to prevent segfault if use -edl option on file with no video

example
mplayer -edl list.edl audio.wav

comments welcome.

diff -Naur main/mplayer.c updated/mplayer.c
--- main/mplayer.c      2004-03-25 01:40:04.000000000 -0500
+++ updated/mplayer.c   2004-04-03 21:50:19.000000000 -0500
@@ -2467,6 +2467,11 @@

 #ifdef USE_EDL
  if( next_edl_record->next ) { // Are we (still?) doing EDL?
+   if (sh_video == NULL) {
+       mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Can not use edit list without video\n");
+       exit_player(MSGTR_Exit_error);
+     }
+
    if( sh_video->pts >= next_edl_record->start_sec ) {
      if( next_edl_record->action == EDL_SKIP ) {
        osd_function = OSD_FFW;








More information about the MPlayer-dev-eng mailing list