Mercurial > mplayer.hg
comparison subreader.c @ 8618:a879b231b7e3
This patch adds a call to subcp_recode1(), so this subtitles too are
processed through iconv().
Kresimir Kukulj madmax@iskon.hr
author | arpi |
---|---|
date | Sat, 28 Dec 2002 15:19:41 +0000 |
parents | 36d5c7137876 |
children | 8722ca2a1742 |
comparison
equal
deleted
inserted
replaced
8617:6ffbe7608013 | 8618:a879b231b7e3 |
---|---|
962 return ERR; | 962 return ERR; |
963 } | 963 } |
964 return sub; | 964 return sub; |
965 } | 965 } |
966 | 966 |
967 // for demux_ogg.c: | |
968 subtitle* subcp_recode1 (subtitle *sub) | |
969 { | |
970 int l=sub->lines; | |
971 size_t ileft, oleft; | |
972 char *op, *ip; | |
973 | |
974 while (l){ | |
975 ip = icbuffer; | |
976 op = sub->text[--l]; | |
977 strcpy(ip, op); | |
978 ileft = strlen(ip); | |
979 oleft = ICBUFFSIZE - 1; | |
980 | |
981 if (iconv(icdsc, &ip, &ileft, | |
982 &op, &oleft) == (size_t)(-1)) { | |
983 mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: error recoding line.\n"); | |
984 return sub; | |
985 } | |
986 *op='\0' ; | |
987 } | |
988 return sub; | |
989 } | |
967 #endif | 990 #endif |
968 | 991 |
969 static void adjust_subs_time(subtitle* sub, float subtime, float fps, int block){ | 992 static void adjust_subs_time(subtitle* sub, float subtime, float fps, int block){ |
970 int n,m; | 993 int n,m; |
971 subtitle* nextsub; | 994 subtitle* nextsub; |