diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-19 08:35:40 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-19 08:35:40 +0000 |
commit | 4a901e4db0f9c71e70a16c40d5dd1dba04732583 (patch) | |
tree | 407eb63a553b390fcd2ce4e1de074a56ad911b69 /libmpdemux | |
parent | aaf4c414a6a11cd32956feb5008816221f2f93cb (diff) | |
download | mpv-4a901e4db0f9c71e70a16c40d5dd1dba04732583.tar.bz2 mpv-4a901e4db0f9c71e70a16c40d5dd1dba04732583.tar.xz |
Vobsub support tridx setting in .idx file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25460 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mkv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 2f9424c9d8..e7307156ca 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -344,6 +344,8 @@ static int vobsub_parse_custom_colors (sh_sub_t *sh, const char *start) { int use_custom_colors, i; + const char *p; + unsigned int tridx = 0; use_custom_colors = 0; start += 14; @@ -355,6 +357,8 @@ vobsub_parse_custom_colors (sh_sub_t *sh, const char *start) use_custom_colors = 0; mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] VobSub custom colors: %s\n", use_custom_colors ? "ON" : "OFF"); + if ((p = strstr(start, "tridx:")) != NULL) + tridx = strtoul(p + 6, NULL, 2); if ((start = strstr(start, "colors:")) != NULL) { start += 7; @@ -366,6 +370,8 @@ vobsub_parse_custom_colors (sh_sub_t *sh, const char *start) if (sscanf(start, "%06x", &tmp) != 1) break; sh->colors[i] = vobsub_rgb_to_yuv(tmp); + if ((tridx << i) & 0x08) + sh->colors[i] |= 1 << 31; start += 6; while ((*start == ',') || isspace(*start)) start++; @@ -373,8 +379,8 @@ vobsub_parse_custom_colors (sh_sub_t *sh, const char *start) if (i == 4) { sh->custom_colors = 4; - mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] VobSub colors: %06x," - "%06x,%06x,%06x\n", sh->colors[0], + mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] VobSub colors: %08x," + "%08x,%08x,%08x\n", sh->colors[0], sh->colors[1], sh->colors[2], sh->colors[3]); } |