[vlc-commits] avi: Fix seek bar position when streaming through network (fixes #2151)
Samuel Pitoiset
git at videolan.org
Thu Feb 7 18:30:42 CET 2013
vlc | branch: master | Samuel Pitoiset <samuel.pitoiset at gmail.com> | Tue Aug 21 17:48:37 2012 +0000| [606a09d23c297255ef2982861a3040cf7d0a3bf4] | committer: Jean-Baptiste Kempf
avi: Fix seek bar position when streaming through network (fixes #2151)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=606a09d23c297255ef2982861a3040cf7d0a3bf4
---
modules/demux/avi/avi.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 579891d..7f5dea3 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1405,25 +1405,8 @@ static double ControlGetPosition( demux_t *p_demux )
}
else if( stream_Size( p_demux->s ) > 0 )
{
- unsigned int i;
- int64_t i_tmp;
- int64_t i64 = 0;
-
- /* search the more advanced selected es */
- for( i = 0; i < p_sys->i_track; i++ )
- {
- avi_track_t *tk = p_sys->track[i];
- if( tk->b_activated && tk->i_idxposc < tk->idx.i_size )
- {
- i_tmp = tk->idx.p_entry[tk->i_idxposc].i_pos +
- tk->idx.p_entry[tk->i_idxposc].i_length + 8;
- if( i_tmp > i64 )
- {
- i64 = i_tmp;
- }
- }
- }
- return (double)i64 / stream_Size( p_demux->s );
+ double i64 = (uint64_t)stream_Tell( p_demux->s );
+ return i64 / stream_Size( p_demux->s );
}
return 0.0;
}
More information about the vlc-commits
mailing list