diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-28 15:19:41 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-28 15:19:41 +0000 |
commit | e29bcd7e0284b6d8518a1d25506f0ee18fec4a60 (patch) | |
tree | 07635b8341a2742be74182dd448246f88299f61b /subreader.c | |
parent | 64c707788469809fd572ba24c967dd7e1fc2aed8 (diff) | |
download | mpv-e29bcd7e0284b6d8518a1d25506f0ee18fec4a60.tar.bz2 mpv-e29bcd7e0284b6d8518a1d25506f0ee18fec4a60.tar.xz |
This patch adds a call to subcp_recode1(), so this subtitles too are
processed through iconv().
Kresimir Kukulj madmax@iskon.hr
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8619 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r-- | subreader.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/subreader.c b/subreader.c index 50c4456b1d..2add84f7c8 100644 --- a/subreader.c +++ b/subreader.c @@ -964,6 +964,29 @@ subtitle* subcp_recode (subtitle *sub) 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){ |