[Mplayer-cvslog] CVS: main subreader.c,1.109,1.110

Adam Tla/lka CVS atlka at mplayerhq.hu
Tue Jul 1 09:17:03 CEST 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv5576

Modified Files:
	subreader.c 
Log Message:
small correction of sub_utf8 restoring between reading sub files


Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- subreader.c	27 Jun 2003 09:25:05 -0000	1.109
+++ subreader.c	1 Jul 2003 07:16:39 -0000	1.110
@@ -1166,6 +1166,17 @@
     
     if(filename==NULL) return NULL; //qnx segfault
     fd=fopen (filename, "r"); if (!fd) return NULL;
+    
+    sub_format=sub_autodetect (fd, &uses_time);
+    mpsub_multiplier = (uses_time ? 100.0 : 1.0);
+    if (sub_format==SUB_INVALID) {mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");return NULL;}
+    srp=sr+sub_format;
+    mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Detected subtitle file format: %s\n", srp->name);
+    
+    rewind (fd);
+
+#ifdef USE_ICONV
+    sub_utf8_prev=sub_utf8;
     {
 	    int l;
 	    if ((l=strlen(filename))>4){
@@ -1178,17 +1189,7 @@
 			}
 	    }
     }
-    sub_format=sub_autodetect (fd, &uses_time);
-    mpsub_multiplier = (uses_time ? 100.0 : 1.0);
-    if (sub_format==SUB_INVALID) {mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: Could not determine file format\n");return NULL;}
-    srp=sr+sub_format;
-    mp_msg(MSGT_SUBREADER,MSGL_INFO,"SUB: Detected subtitle file format: %s\n", srp->name);
-    
-    rewind (fd);
-
-#ifdef USE_ICONV
-    sub_utf8_prev=sub_utf8;
-    subcp_open();
+    if (!(sub_utf8 & 1)) subcp_open();
 #endif
 
     sub_num=0;n_max=32;



More information about the MPlayer-cvslog mailing list