mirror of https://github.com/mpv-player/mpv
sub_utf8 handling hopefully fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9146 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0e2e9bb30f
commit
e633df0399
|
@ -923,7 +923,6 @@ void subcp_open (void)
|
||||||
if (sub_cp){
|
if (sub_cp){
|
||||||
if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){
|
if ((icdsc = iconv_open (tocp, sub_cp)) != (iconv_t)(-1)){
|
||||||
mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n");
|
mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: opened iconv descriptor.\n");
|
||||||
sub_utf8_prev=sub_utf8;
|
|
||||||
sub_utf8 = 2;
|
sub_utf8 = 2;
|
||||||
} else
|
} else
|
||||||
mp_msg(MSGT_SUBREADER,MSGL_ERR,"SUB: error opening iconv descriptor.\n");
|
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)){
|
if (icdsc != (iconv_t)(-1)){
|
||||||
(void) iconv_close (icdsc);
|
(void) iconv_close (icdsc);
|
||||||
icdsc = (iconv_t)(-1);
|
icdsc = (iconv_t)(-1);
|
||||||
sub_utf8=sub_utf8_prev;
|
|
||||||
mp_msg(MSGT_SUBREADER,MSGL_V,"SUB: closed iconv descriptor.\n");
|
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);
|
rewind (fd);
|
||||||
|
|
||||||
#ifdef USE_ICONV
|
#ifdef USE_ICONV
|
||||||
|
sub_utf8_prev=sub_utf8;
|
||||||
subcp_open();
|
subcp_open();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1131,6 +1130,7 @@ subtitle* sub_read_file (char *filename, float fps) {
|
||||||
{
|
{
|
||||||
#ifdef USE_ICONV
|
#ifdef USE_ICONV
|
||||||
subcp_close();
|
subcp_close();
|
||||||
|
sub_utf8=sub_utf8_prev;
|
||||||
#endif
|
#endif
|
||||||
if ( first ) free(first);
|
if ( first ) free(first);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue