[MPlayer-dev-eng] [PATCH] Small cleanup in demux_mpg.c
Nico Sabbi
nicola_sabbi at fastwebnet.it
Tue Feb 27 21:27:53 CET 2007
Rich Felker wrote:
> On Tue, Feb 27, 2007 at 11:35:42AM +0800, Zuxy Meng wrote:
>
>>Index: libmpdemux/demux_mpg.c
>>===================================================================
>>--- 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)
>
> Rich
I removed that code from demux_mpg and demux_ts, because stream_seek()
already does it
--
"Without a frontend, mplayer is useless" - someone in mplayer-users
More information about the MPlayer-dev-eng
mailing list