[MPlayer-cygwin] Re: Seek in large files

Frank Aurich fa859178 at inf.tu-dresden.de
Tue Jan 2 21:38:31 CET 2007


Vladimir Filippov wrote:
> I use MPlayer 1.0rc1 Windows from 
> http://www.mplayerhq.hu/design7/dload.html
> Then I am try to seek in video file with size about 4,3 GB MPlayer
> write message:
> Cannot seek in this file.
> 
> But there is no problem to seek in this file by MPlayer 1.0pre7 in
> Linux. I try to open file from NTFS and UDF filesystems (in Windows
> and Linux). They normally support files of great volume.
> 
> May be Windows version in mplayerhq.hu compiled without
> --enable-largefiles option? Or the reason in other?

I dug through the source code a bit and found something.
The problem seems to be in stream/stream_file.c, line 90 (or line 153)
Here the size of the video file is determined.
Since len is of value off_t, it can only cover files up to 2GB in size.
Anything larger results in an overflow and therefore negative size values.
This is actually checked in line 162. If size ain't larger than 0, then the seek 
property is not set.

I replaced off_t with unsigned long, unfortunately  that did not help.
I still can't seek in large files.
The length of the video is saved in a stream_t object, here as well with a size 
of off_t.


Maybe the maintainer of the stream files could take a look at this?

Frank




More information about the MPlayer-cygwin mailing list