[MPlayer-dev-eng] [PATCH] Add support for ARIB STD-B24 captions v4

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Oct 29 21:15:16 CET 2009


On Thu, 2009-10-29 at 20:31 +0100, Reimar Döffinger wrote:
> > +	if (offset_mode) {
> > +		arib_dbg("%d%d:%d%d:%d%d:%d%d%d ",
> > +			data[0] >> 4, data[0] & 0xF,
> > +			data[1] >> 4, data[1] & 0xF,
> > +			data[2] >> 4, data[2] & 0xF,
> > +			data[3] >> 4, data[3] & 0xF,
> > +			data[4] >> 4);
> 
> I think the arguments are unsigned char, but %d is for int...

Even if data[n] is an unsigned char there are _two_ steps of standard
integer promotion, either of which would be enough to change the type to
int. First when the expressions are used as arguments to arithmetic
operators, second when the results are passed to a variable argument
function.


BTW I forgot to mention one design problem in my earlier mail: the code
is meant to work with an mpeg container but only adds to its internal
libass track. If the mpeg timestamps are inconsistent and return to a
previous value then it would re-show captions that belonged to the
earlier position.




More information about the MPlayer-dev-eng mailing list