changeset 5138:fce3b54250b1

Fixed the bug that make mplayer crash with no sound and an invalid video codec
author albeu
date Sat, 16 Mar 2002 17:10:15 +0000
parents 74e0ebe59cab
children 473058a6211e
files mplayer.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Mar 16 16:57:35 2002 +0000
+++ b/mplayer.c	Sat Mar 16 17:10:15 2002 +0000
@@ -1247,7 +1247,9 @@
 		if(bestprio==-1 || !video_codec) {
     mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantFindVideoCodec,sh_video->format);
     mp_msg(MSGT_CPLAYER,MSGL_HINT, MSGTR_TryUpgradeCodecsConfOrRTFM,get_path("codecs.conf"));
-    sh_video = d_video->sh = NULL; 
+    if(!sh_audio)
+      goto goto_next_file;
+    sh_video = d_video->sh = NULL;
     goto main; // exit_player(MSGTR_Exit_error);
     }
   } else {