[vlc-devel] commit: Removed unneeded variables from avi demuxer context. ( Laurent Aimar )
git version control
git at videolan.org
Mon Aug 18 19:39:23 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Aug 18 13:19:13 2008 +0200| [ec3c7d6564ae6d05cd199da40673b13320578f78] | committer: Laurent Aimar
Removed unneeded variables from avi demuxer context.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec3c7d6564ae6d05cd199da40673b13320578f78
---
modules/demux/avi/avi.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 8c8dfe5..c6a2701 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -162,10 +162,6 @@ struct demux_sys_t
/* meta */
vlc_meta_t *meta;
-
- /* Progress box */
- mtime_t last_update;
- int i_dialog_id;
};
static inline off_t __EVEN( off_t i )
@@ -2352,12 +2348,15 @@ static void AVI_IndexCreate( demux_t *p_demux )
{
demux_sys_t *p_sys = p_demux->p_sys;
- avi_chunk_list_t *p_riff;
- avi_chunk_list_t *p_movi;
+ avi_chunk_list_t *p_riff;
+ avi_chunk_list_t *p_movi;
unsigned int i_stream;
off_t i_movi_end;
+ mtime_t i_dialog_update;
+ int i_dialog_id;
+
p_riff = AVI_ChunkFind( &p_sys->ck_root, AVIFOURCC_RIFF, 0);
p_movi = AVI_ChunkFind( p_riff, AVIFOURCC_movi, 0);
@@ -2381,13 +2380,13 @@ static void AVI_IndexCreate( demux_t *p_demux )
/* Only show dialog if AVI is > 10MB */
- p_demux->p_sys->i_dialog_id = -1;
+ i_dialog_id = -1;
if( stream_Size( p_demux->s ) > 10000000 )
{
- p_demux->p_sys->i_dialog_id = intf_IntfProgress( p_demux,
+ i_dialog_id = intf_IntfProgress( p_demux,
_( "Fixing AVI Index..." ),
0.0 );
- p_demux->p_sys->last_update = mdate();
+ i_dialog_update = mdate();
}
for( ;; )
@@ -2398,14 +2397,13 @@ static void AVI_IndexCreate( demux_t *p_demux )
break;
/* Don't update dialog too often */
- if( p_demux->p_sys->i_dialog_id > 0 &&
- mdate() - p_demux->p_sys->last_update > 100000 )
+ if( i_dialog_id > 0 && mdate() - i_dialog_update > 100000 )
{
int64_t i_pos = stream_Tell( p_demux->s )* 100 /
stream_Size( p_demux->s );
float f_pos = (float)i_pos;
- p_demux->p_sys->last_update = mdate();
- intf_ProgressUpdate( p_demux, p_demux->p_sys->i_dialog_id,
+ i_dialog_update = mdate();
+ intf_ProgressUpdate( p_demux, i_dialog_id,
_( "Fixing AVI Index..." ), f_pos, -1 );
}
@@ -2466,9 +2464,9 @@ static void AVI_IndexCreate( demux_t *p_demux )
}
print_stat:
- if( p_demux->p_sys->i_dialog_id > 0 )
+ if( i_dialog_id > 0 )
{
- intf_UserHide( p_demux, p_demux->p_sys->i_dialog_id );
+ intf_UserHide( p_demux, i_dialog_id );
}
for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
More information about the vlc-devel
mailing list