From e29bcd7e0284b6d8518a1d25506f0ee18fec4a60 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 28 Dec 2002 15:19:41 +0000 Subject: 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 --- subreader.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'subreader.c') 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){ -- cgit v1.2.3