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

Rich Felker dalias at aerifal.cx
Wed Apr 20 17:09:25 CEST 2005


On Wed, Apr 20, 2005 at 10:58:06AM +0200, 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.

inttypes.h is not C99, you're thinking of stdint.h. Anyway this is a
libc issue, not a gcc issue. MPlayer policy is to require inttypes.h,
and never to use stdint.h. MPlayer also does not depend on POSIX (it
works on mingw for instance).

> If our policy is to use C99 standard, I'll reverse this. But then

It's not. Policy is to use inttypes.h. Please reverse and fix since
it's probably broken on non-POSIX systems right now and breaking
policy anyway.

> you'll fix all the uses of u_int??_t in MPlayer, I assume?

AFAIK it's never used anywhere else.

Rich




More information about the MPlayer-cvslog mailing list