[MPlayer-dev-eng] [PATCH] Small cleanup in demux_mpg.c
Diego Biurrun
diego at biurrun.de
Tue Feb 27 11:11:41 CET 2007
On Mon, Feb 26, 2007 at 11:34:45PM -0500, Rich Felker wrote:
> On Tue, Feb 27, 2007 at 11:35:42AM +0800, Zuxy Meng wrote:
> > Use off_t instead of _LARGEFILE_SOURCE macro.
> >
> > --- libmpdemux/demux_mpg.c ???????? 22356??
> > +++ libmpdemux/demux_mpg.c ????????????
> > @@ -892,11 +893,7 @@
> > if(newpos<demuxer->movi_start) newpos=demuxer->movi_start;
> > }
> >
> > -#ifdef _LARGEFILE_SOURCE
> > - newpos&=~((long long)STREAM_BUFFER_SIZE-1); /* sector boundary */
> > -#else
> > - newpos&=~(STREAM_BUFFER_SIZE-1); /* sector boundary */
> > -#endif
> > + newpos&=~((off_t)STREAM_BUFFER_SIZE-1); /* sector boundary */
>
> Thanks! The old code was actually _incorrect_ since off_t can be
> larger than int without _LARGEFILE_SOURCE. (1. because
> _LARGEFILE_SOURCE is nonstandard GNU crap, and 2. because off_t is
> long even without _LARGEFILE_SOURCE on GNU, and long is 64bit on 64bit
> archs)
So, are you going to apply the patch, Rich?
Diego
More information about the MPlayer-dev-eng
mailing list