Re: [AVFS] amarok skips the initial part of files accessed via avfs+fuse

Miklos Szeredi <[email protected]> Mon, 14 May 2007 13:48:29 +0200
Newsgroups gmane.comp.file-systems.avfs.user
Message-ID <[email protected]>
> 
> I looked into this problem and was able to reproduce it. The problem 
> lies in the uzip module (actually it's the file zread.c which is used by 
> uzip).
> 
> The bug is triggered by seeking to the end of a file in a zip archive 
> and back to the beginning. This is done by mplayer/xine/amarok/whatever 
> (probably ID3 tags at the end of the file).
> 
> When seeking back to the beginning, a previously stored zlib stream is 
> used but the flag iseof is not restored.
> 
> I propose the attached patch, could you please try it and report whether 
> it solved your problems? It works for me but I only tested mplayer not 
> amarok.
> 
> Miklos, you wrote the zread code (some years ago :-) ), do you think the 
> patch is okay?

Yes, I think saving the iseof flag makes sense.  An alternate solution
could be to not cache those streams, which are at the end of file.
But that would complicate things for very little gain probably.

So yes, I think this is the right fix.

Thanks,
Miklos

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/