[Mplayer-cvslog] CVS: main subreader.c,1.95,1.96

Jindrich Makovicka CVS henry at mplayerhq.hu
Tue Jan 28 19:46:22 CET 2003


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

Modified Files:
	subreader.c 
Log Message:
sub_utf8 handling hopefully fixed

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- subreader.c	28 Jan 2003 18:28:09 -0000	1.95
+++ subreader.c	28 Jan 2003 18:45:58 -0000	1.96
@@ -923,7 +923,6 @@
 	if (sub_cp){
 		if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){
 			mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n");
-			sub_utf8_prev=sub_utf8;
 			sub_utf8 = 2;
 		} else
 			mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: error opening iconv descriptor.\n");
@@ -935,7 +934,6 @@
 	if (icdsc != (iconv_t)(-1)){
 		(void) iconv_close (icdsc);
 		icdsc = (iconv_t)(-1);
-		sub_utf8=sub_utf8_prev;
 	   	mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: closed iconv descriptor.\n");
 	}
 }
@@ -1100,6 +1098,7 @@
     rewind (fd);
 
 #ifdef USE_ICONV
+    sub_utf8_prev=sub_utf8;
     subcp_open();
 #endif
 
@@ -1131,6 +1130,7 @@
 	 {
 #ifdef USE_ICONV
           subcp_close();
+          sub_utf8=sub_utf8_prev;
 #endif
     	  if ( first ) free(first);
 	  return NULL; 



More information about the MPlayer-cvslog mailing list