[vlc-devel] [PATCH] support for seeking in AVI over http

Rémi Denis-Courmont remi at remlab.net
Mon Oct 26 18:16:30 CET 2009


-            if( p_sys->b_seekable )
+            if( p_sys->b_fastseekable )
             {
                 i64 = (mtime_t)(1000000.0 * p_sys->i_length * f );
                 return Seek( p_demux, i64, (int)(f * 100) );
             }
             else
             {
-                int64_t i_pos = stream_Size( p_demux->s ) * f;
+                int64_t i_pos = stream_Tell(p_demux->s) + stream_Size( 
p_demux->s ) * f;
                 return stream_Seek( p_demux->s, i_pos );

This looks fishy to me... AFAIK, f is a fraction of the complete file, not a 
fraction of the remainder of the file.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list