Mercurial > mplayer.hg
changeset 15562:834bdc663f3f
more paranoid return value checking
author | henry |
---|---|
date | Tue, 24 May 2005 08:42:20 +0000 |
parents | 6e2c6d2553bd |
children | 762d86d96544 |
files | subreader.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/subreader.c Tue May 24 08:29:45 2005 +0000 +++ b/subreader.c Tue May 24 08:42:20 2005 +0000 @@ -1329,7 +1329,7 @@ analyser = enca_analyser_alloc(languages[i]); encoding = enca_analyse_const(analyser, buffer, buflen); tmp = enca_charset_name(encoding.charset, ENCA_NAME_STYLE_ICONV); - if (tmp) { + if (tmp && encoding.charset != ENCA_CS_UNKNOWN) { detected_sub_cp = strdup(tmp); mp_msg(MSGT_SUBREADER, MSGL_INFO, "ENCA detected charset: %s\n", tmp); }