[MPlayer-dev-eng] Re: [PATCH] make demuxer_get_percent_pos() recheck file length

Alban Bedel albeu at free.fr
Sun Oct 2 10:45:17 CEST 2005


On Sat, 01 Oct 2005 19:50:11 -0700
"Scott W. Larson" <scowl at pacifier.com> wrote:

> Rich Felker wrote:
> 
> >I have a feeling this could break horribly with non-file streams...
> >
> >Rich
> >  
> >
> Here's a safer patch. If the lseek to current position fails then it 
> knows it's not reading from a file and skips all of the new code.
> 

The fd field could be anything (ie there not even a guarentee that
it acctually hold a fd), so just lseek'ing it blindly is not acceptable.
Instead this should be implemented with a control call on the stream.

	Albeu




More information about the MPlayer-dev-eng mailing list