[MPlayer-dev-eng] [PATCH] Use tridx in vobsub idx file for custom colors.

Ulion ulion2002 at gmail.com
Wed Dec 19 09:36:40 CET 2007


2007/12/16, Ulion <ulion2002 at gmail.com>:
> 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.

Fix bug and commited.

-- 
Ulion



More information about the MPlayer-dev-eng mailing list