X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmux%2Favi.c;h=0d2c4b6f4b3fbe80ad78780f55ac0f4aa5c12746;hb=9cc1540b8c973407d32c013489e2e1277141ef1e;hp=28a36160d324494a19c6c43472110397c7ec0176;hpb=ad77d955a5dc051976d94d6e08ee0f717ec3a938;p=vlc diff --git a/modules/mux/avi.c b/modules/mux/avi.c index 28a36160d3..0d2c4b6f4b 100644 --- a/modules/mux/avi.c +++ b/modules/mux/avi.c @@ -1,7 +1,7 @@ /***************************************************************************** * avi.c ***************************************************************************** - * Copyright (C) 2001, 2002 the VideoLAN team + * Copyright (C) 2001-2009 the VideoLAN team * $Id$ * * Authors: Laurent Aimar @@ -138,7 +138,7 @@ static void SetFCC( uint8_t *p, char *fcc ) static int Open( vlc_object_t *p_this ) { sout_mux_t *p_mux = (sout_mux_t*)p_this; - sout_mux_sys_t *p_sys = p_mux->p_sys; + sout_mux_sys_t *p_sys; msg_Dbg( p_mux, "AVI muxer opened" ); @@ -211,7 +211,7 @@ static void Close( vlc_object_t * p_this ) (uint64_t)p_stream->i_duration; } msg_Info( p_mux, "stream[%d] duration:%"PRId64" totalsize:%"PRId64 - " frames:%d fps:%f kb/s:%d", + " frames:%d fps:%f KiB/s:%d", i_stream, (int64_t)p_stream->i_duration / (int64_t)1000000, p_stream->i_totalsize, @@ -482,8 +482,8 @@ static int Mux ( sout_mux_t *p_mux ) if( p_sys->idx1.i_entry_count >= p_sys->idx1.i_entry_max ) { p_sys->idx1.i_entry_max += 10000; - p_sys->idx1.entry = realloc( p_sys->idx1.entry, - p_sys->idx1.i_entry_max * sizeof( avi_idx1_entry_t ) ); + p_sys->idx1.entry = xrealloc( p_sys->idx1.entry, + p_sys->idx1.i_entry_max * sizeof( avi_idx1_entry_t ) ); } p_data = block_Realloc( p_data, 8, p_data->i_buffer ); @@ -806,7 +806,6 @@ static block_t *avi_HeaderCreateRIFF( sout_mux_t *p_mux ) sout_mux_sys_t *p_sys = p_mux->p_sys; block_t *p_hdr; int i_stream; - int i_maxbytespersec; int i_junk; buffer_out_t bo; @@ -824,7 +823,7 @@ static block_t *avi_HeaderCreateRIFF( sout_mux_t *p_mux ) bo_AddFCC( &bo, "hdrl" ); avi_HeaderAdd_avih( p_mux, &bo ); - for( i_stream = 0,i_maxbytespersec = 0; i_stream < p_sys->i_streams; i_stream++ ) + for( i_stream = 0; i_stream < p_sys->i_streams; i_stream++ ) { avi_HeaderAdd_strl( &bo, &p_sys->stream[i_stream] ); }