[Mplayer-cvslog] CVS: main subreader.c,1.94,1.95
Arpi of Ize
arpi at mplayerhq.hu
Tue Jan 28 19:28:28 CET 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv12881
Modified Files:
subreader.c
Log Message:
maybe fix ogm vs. iconv
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- subreader.c 27 Jan 2003 23:41:38 -0000 1.94
+++ subreader.c 28 Jan 2003 18:28:09 -0000 1.95
@@ -934,6 +934,7 @@
{
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");
}
@@ -983,18 +984,19 @@
{
int l=sub->lines;
size_t ileft, oleft;
- char *op, *ip;
+
+ if(icdsc == (iconv_t)(-1)) return sub;
while (l){
- ip = icbuffer;
- op = sub->text[--l];
+ char *ip = icbuffer;
+ char *op = sub->text[--l];
strcpy(ip, op);
ileft = strlen(ip);
oleft = ICBUFFSIZE - 1;
if (iconv(icdsc, &ip, &ileft,
&op, &oleft) == (size_t)(-1)) {
- mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error recoding line (2).\n");
+ mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: error recoding line (2).\n");
return sub;
}
*op='\0' ;
More information about the MPlayer-cvslog
mailing list