summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-23 22:16:47 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commit29cec6f98ba523025acdd1aea42795985e32306f (patch)
treef189ce66e8a8ea39547db1b59adea7a5a793bc04 /sub
parent9ee7364172fb4feae8cba07f9244a06286fd7399 (diff)
downloadmpv-29cec6f98ba523025acdd1aea42795985e32306f.tar.bz2
mpv-29cec6f98ba523025acdd1aea42795985e32306f.tar.xz
sub: prevent subtitle conversion if subs are known UTF-8
Currently this happens only in an obscure case (reading UTF-16 files with the old subreader).
Diffstat (limited to 'sub')
-rw-r--r--sub/dec_sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 2b4bfc2e8d..6129e48c38 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -312,7 +312,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_sub *sh)
// Can't run auto-detection on movtext packets: it's the only codec that
// even though it decodes to text has binary input data.
- if (opts->sub_cp && strcmp(codec, "movtext") != 0)
+ if (opts->sub_cp && !sh->is_utf8 && strcmp(codec, "movtext") != 0)
sub->charset = guess_sub_cp(&subs, opts->sub_cp);
if (sub->charset)