changeset 14513:b712f8437a08

set sub_utf8 only when actually using mkv subtitles, will break external subtitles (-sub) otherwise.
author reimar
date Sun, 16 Jan 2005 12:17:41 +0000
parents 68e5e1122a91
children 7c433bf88d1e
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sun Jan 16 11:41:39 2005 +0000
+++ b/libmpdemux/demux_mkv.c	Sun Jan 16 12:17:41 2005 +0000
@@ -1041,14 +1041,12 @@
                    || !strcmp (track->codec_id, MKV_S_ASS))
             {
               track->subtitle_type = MATROSKA_SUBTYPE_SSA;
-              sub_utf8 = 1;
             }
           else if (!strcmp (track->codec_id, MKV_S_TEXTASCII))
             track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
           if (!strcmp (track->codec_id, MKV_S_TEXTUTF8))
             {
               track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
-              sub_utf8 = 1;
             }
           mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] |  + Codec ID: %s\n",
                   track->codec_id);
@@ -2642,6 +2640,7 @@
 #ifdef USE_ICONV
   subcp_recode1 (&mkv_d->subs);
 #endif
+  sub_utf8 = 1;
   vo_sub = &mkv_d->subs;
   vo_osd_changed (OSDTYPE_SUBTITLE);
 }