mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 11:55:42 +00:00
set sub_utf8 only when actually using mkv subtitles, will break external
subtitles (-sub) otherwise. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14514 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4b22c51195
commit
027ed1e38e
@ -1041,14 +1041,12 @@ demux_mkv_read_trackentry (demuxer_t *demuxer)
|
|||||||
|| !strcmp (track->codec_id, MKV_S_ASS))
|
|| !strcmp (track->codec_id, MKV_S_ASS))
|
||||||
{
|
{
|
||||||
track->subtitle_type = MATROSKA_SUBTYPE_SSA;
|
track->subtitle_type = MATROSKA_SUBTYPE_SSA;
|
||||||
sub_utf8 = 1;
|
|
||||||
}
|
}
|
||||||
else if (!strcmp (track->codec_id, MKV_S_TEXTASCII))
|
else if (!strcmp (track->codec_id, MKV_S_TEXTASCII))
|
||||||
track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
|
track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
|
||||||
if (!strcmp (track->codec_id, MKV_S_TEXTUTF8))
|
if (!strcmp (track->codec_id, MKV_S_TEXTUTF8))
|
||||||
{
|
{
|
||||||
track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
|
track->subtitle_type = MATROSKA_SUBTYPE_TEXT;
|
||||||
sub_utf8 = 1;
|
|
||||||
}
|
}
|
||||||
mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + Codec ID: %s\n",
|
mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + Codec ID: %s\n",
|
||||||
track->codec_id);
|
track->codec_id);
|
||||||
@ -2642,6 +2640,7 @@ handle_subtitles(demuxer_t *demuxer, mkv_track_t *track, char *block,
|
|||||||
#ifdef USE_ICONV
|
#ifdef USE_ICONV
|
||||||
subcp_recode1 (&mkv_d->subs);
|
subcp_recode1 (&mkv_d->subs);
|
||||||
#endif
|
#endif
|
||||||
|
sub_utf8 = 1;
|
||||||
vo_sub = &mkv_d->subs;
|
vo_sub = &mkv_d->subs;
|
||||||
vo_osd_changed (OSDTYPE_SUBTITLE);
|
vo_osd_changed (OSDTYPE_SUBTITLE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user