[MPlayer-dev-eng] [PATCH] small semplification in stream_seek()
Nico Sabbi
nicola_sabbi at fastwebnet.it
Tue Feb 27 23:20:07 CET 2007
Ivan Kalvachev wrote:
> 2007/2/27, Nico Sabbi <nicola_sabbi at fastwebnet.it>:
>
>> As discussed in another thread the seeking can be simplified ignoring the
>> definition of _LARGEFILE_SOURCE_
>> Paternity of this patch belongs to Zuxy.
>
>
> Are you talking about "[MPlayer-dev-eng] [PATCH] Small cleanup in
> demux_mpg.c" thread?
yes
>
>> If no one objects I'll commit tomorrow
>
>
> Not really objection...
> I just wonder do you know why s->stream_size is ignored when
> s->type==STREAMTYPE_STREAM.
dunno
>
> I ask this because in the patch this behavior is removed.
why removed? STREAMTYPE_STREAM used STREAM_BUFFER_SIZE like
all other streams (except block-based ones) :
switch(s->type){
case STREAMTYPE_STREAM:
#ifdef _LARGEFILE_SOURCE
newpos=pos&(~((long long)STREAM_BUFFER_SIZE-1));break;
#else
newpos=pos&(~(STREAM_BUFFER_SIZE-1));break;
#endif
default:
// Round on sector size
if(s->sector_size)
newpos=(pos/s->sector_size)*s->sector_size;
else { // Otherwise on the buffer size
#ifdef _LARGEFILE_SOURCE
newpos=pos&(~((long long)STREAM_BUFFER_SIZE-1));break;
#else
newpos=pos&(~(STREAM_BUFFER_SIZE-1));break;
#endif
}
break;
}
--
"Without a frontend, mplayer is useless" - someone in mplayer-users
More information about the MPlayer-dev-eng
mailing list