[MPlayer-dev-eng] [PATCH] Use tridx in vobsub idx file for custom colors.
Ulion
ulion2002 at gmail.com
Sun Dec 16 16:26:48 CET 2007
2007/12/16, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Sun, Dec 16, 2007 at 11:05:24PM +0800, Ulion wrote:
> > @@ -355,6 +357,8 @@
> > 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, 16);
>
> Why do you parse it as hex, I think it should be binary?
> This would also simplify the check below quite a bit,
> namely to "if ((tridx << i) & 0x80)"
> and actually that << i could be avoided by adding a
> tridx <<= 1; at each loop iteration.
original code in vobsub.c did that, now I fixed it as you suggested.
updated patch is here.
--
Ulion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vobsub_tridx3.diff
Type: text/x-patch
Size: 3133 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071216/86485957/attachment.bin>
More information about the MPlayer-dev-eng
mailing list