[Mplayer-cvslog] CVS: main subreader.c,1.133,1.134

Jindrich Makovicka CVS syncmail at mplayerhq.hu
Fri May 21 18:02:11 CEST 2004


CVS change done by Jindrich Makovicka CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv24528

Modified Files:
	subreader.c 
Log Message:
1e6l

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- subreader.c	9 May 2004 22:15:54 -0000	1.133
+++ subreader.c	21 May 2004 16:02:09 -0000	1.134
@@ -1045,11 +1045,13 @@
 void	subcp_open_noenca ()
 {
     char enca_lang[100], enca_fallback[100];
-    if (sscanf(sub_cp, "enca:%2s:%s", enca_lang, enca_fallback) == 2
-	|| sscanf(sub_cp, "ENCA:%2s:%s", enca_lang, enca_fallback) == 2) {
-	subcp_open(enca_fallback);
-    } else {
-	subcp_open(sub_cp);
+    if (sub_cp) {
+	if (sscanf(sub_cp, "enca:%2s:%s", enca_lang, enca_fallback) == 2
+	    || sscanf(sub_cp, "ENCA:%2s:%s", enca_lang, enca_fallback) == 2) {
+	    subcp_open(enca_fallback);
+	} else {
+	    subcp_open(sub_cp);
+	}
     }
 }
 #else




More information about the MPlayer-cvslog mailing list