[vlc-devel] [PATCH 2/2] avi: Fix seek bar position when streaming through network (fixes #2151)
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Aug 21 20:48:37 CEST 2012
---
modules/demux/avi/avi.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index f2579b8..ebf720b 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1407,25 +1407,7 @@ 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 );
+ return (double)stream_Tell( p_demux->s ) / (double)stream_Size( p_demux->s );
}
return 0.0;
}
--
1.7.11.3
More information about the vlc-devel
mailing list