[MPlayer-dvb] [PATCH] Format of DVB PROGRAM N.
Nico Sabbi
nsabbi at email.it
Tue May 29 09:47:35 CEST 2007
Mario Rossi wrote:
> Hi,
>
> BBC HD1 has a PROGRAM N. (36932) bigger than 2^15, so it does not fit
> well into a signed variable.
>
> With this patch the ouput is correct.
>
> Cheers
>
>------------------------------------------------------------------------
>
>Index: libmpdemux/demux_ts.c
>===================================================================
>--- libmpdemux/demux_ts.c (revision 23404)
>+++ libmpdemux/demux_ts.c (working copy)
>@@ -874,7 +874,7 @@
> {
> if(demuxer->stream->eof && (ret == 0))
> ret = init_pos;
>- mp_msg(MSGT_DEMUXER, MSGL_INFO, " PROGRAM N. %d\n", param->prog);
>+ mp_msg(MSGT_DEMUXER, MSGL_INFO, " PROGRAM N. %hu\n", param->prog);
> }
> else
> mp_msg(MSGT_DEMUXER, MSGL_INFO, "\n");
>
>
%d is more than enough for a 16 bit int. Excerpt from sprintf()
d,i The int argument is converted to signed decimal
notation. The
precision, if any, gives the minimum number of digits
that must
appear; if the converted value requires fewer digits,
it is
padded on the left with zeros. The default precision is
1. When
0 is printed with an explicit precision 0, the output is
empty.
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Mondolastminute, oltre 500 proposte vacanza a prezzi lastminute! Scopri tutte le offerte della settimana
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6608&d=29-5
More information about the MPlayer-dvb
mailing list