[MPlayer-cvslog] CVS: main/libmpdemux mpeg_hdr.c,1.12,1.13

Alexander Strasser eclipse7 at gmx.net
Wed Apr 20 11:19:00 CEST 2005


Dominik 'Rathann' Mierzejewski wrote:
> On Wednesday, 20 April 2005 at 07:17, Rich Felker wrote:
> > On Wed, Apr 20, 2005 at 01:15:43AM -0400, Rich Felker wrote:
> > > On Tue, Apr 19, 2005 at 11:51:16PM +0200, Dominik Mierzejewski CVS wrote:
> > > > CVS change done by Dominik Mierzejewski CVS
> > > > 
> > > > Update of /cvsroot/mplayer/main/libmpdemux
> > > > In directory mail:/var2/tmp/cvs-serv5997
> > > > 
> > > > Modified Files:
> > > > 	mpeg_hdr.c 
> > > > Log Message:
> > > > 100l to Loren! Fixing typo.
> > > > 
> > > > 
> > > > Index: mpeg_hdr.c
> > > > ===================================================================
> > > > RCS file: /cvsroot/mplayer/main/libmpdemux/mpeg_hdr.c,v
> > > > retrieving revision 1.12
> > > > retrieving revision 1.13
> > > > diff -u -r1.12 -r1.13
> > > > --- mpeg_hdr.c	19 Apr 2005 21:17:39 -0000	1.12
> > > > +++ mpeg_hdr.c	19 Apr 2005 21:51:14 -0000	1.13
> > > > @@ -286,7 +286,7 @@
> > > >      fixed_fps = getbits(buf, n, 1);
> > > >      
> > > >      if(picture->timeinc_unit > 0 && picture->timeinc_resolution > 0)
> > > > -      picture->fps = ((uint64_t)picture->timeinc_resolution * 10000) / picture->timeinc_unit;
> > > > +      picture->fps = ((u_int64_t)picture->timeinc_resolution * 10000) / picture->timeinc_unit;
> > > 
> > > WTF? This is wrong, reverse! uint64_t is the correct typedef.
> > 
> > To elaborate: the proper fix is to include inttypes.h
> 
> To elaborate: all u_int??_t are defined in POSIX headers (sys/types.h),
> and all uint??_t are defined in ANSI C99 headers (inttypes.h). AFAIR gcc
> 2.95 is not ANSI C99 compatible. Choose your poison.

  I don't know the history of inttypes.h but i think that C99 specifies
things to be in stdint.h. Anyway afaik we have settled on using inttypes.h
so it should be used. It has even a configure check and MPlayer won't work
without it anyway.

> If our policy is to use C99 standard, I'll reverse this. But then
> you'll fix all the uses of u_int??_t in MPlayer, I assume?

  If you want it that way, the policy is to use inttypes.h i believe.

  Alex (beastd)




More information about the MPlayer-cvslog mailing list