summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-28 18:45:58 +0000
committerhenry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-28 18:45:58 +0000
commite633df03993c3c0e4bcfae75666f4bcac9ecc4dc (patch)
treec4c56494cfd4c5f0ceb04d1dcdca7b932d6564cf /subreader.c
parent0e2e9bb30fe5e657fa40e200d95caa6d687d56cb (diff)
downloadmpv-e633df03993c3c0e4bcfae75666f4bcac9ecc4dc.tar.bz2
mpv-e633df03993c3c0e4bcfae75666f4bcac9ecc4dc.tar.xz
sub_utf8 handling hopefully fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9146 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c
index 7e2db174d1..a77697b84e 100644
--- a/subreader.c
+++ b/subreader.c
@@ -923,7 +923,6 @@ void subcp_open (void)
if (sub_cp){
if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){
mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n");
- sub_utf8_prev=sub_utf8;
sub_utf8 = 2;
} else
mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: error opening iconv descriptor.\n");
@@ -935,7 +934,6 @@ void subcp_close (void)
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");
}
}
@@ -1100,6 +1098,7 @@ subtitle* sub_read_file (char *filename, float fps) {
rewind (fd);
#ifdef USE_ICONV
+ sub_utf8_prev=sub_utf8;
subcp_open();
#endif
@@ -1131,6 +1130,7 @@ subtitle* sub_read_file (char *filename, float fps) {
{
#ifdef USE_ICONV
subcp_close();
+ sub_utf8=sub_utf8_prev;
#endif
if ( first ) free(first);
return NULL;