Mercurial > mplayer.hg
diff 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 |
line wrap: on
line diff
--- a/subreader.c Sat Dec 28 15:03:23 2002 +0000 +++ b/subreader.c Sat Dec 28 15:19:41 2002 +0000 @@ -964,6 +964,29 @@ return sub; } +// for demux_ogg.c: +subtitle* subcp_recode1 (subtitle *sub) +{ + int l=sub->lines; + size_t ileft, oleft; + char *op, *ip; + + while (l){ + ip = icbuffer; + 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.\n"); + return sub; + } + *op='\0' ; + } + return sub; +} #endif static void adjust_subs_time(subtitle* sub, float subtime, float fps, int block){