[vlc-commits] mux/ogg: fix variable shadowing
Rémi Denis-Courmont
git at videolan.org
Sat Mar 2 20:30:05 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 2 21:24:34 2019 +0200| [c48f56ff7f560d7239ff274d9ab84649d81c5d94] | committer: Rémi Denis-Courmont
mux/ogg: fix variable shadowing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c48f56ff7f560d7239ff274d9ab84649d81c5d94
---
modules/mux/ogg.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 4bba9f89d6..4752cf80af 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -940,7 +940,6 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
ogg_packet op;
ogg_stream_t *p_stream;
sout_mux_sys_t *p_sys = p_mux->p_sys;
- int i;
if( sout_AccessOutControl( p_mux->p_access,
ACCESS_OUT_CAN_SEEK,
@@ -996,7 +995,7 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
* must appear first in the ogg stream so we take care of them first. */
for( int pass = 0; pass < 2; pass++ )
{
- for( i = 0; i < p_mux->i_nb_inputs; i++ )
+ for( int i = 0; i < p_mux->i_nb_inputs; i++ )
{
sout_input_t *p_input = p_mux->pp_inputs[i];
p_stream = (ogg_stream_t*)p_input->p_sys;
@@ -1115,7 +1114,7 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
/* Create fisbones if any */
if ( p_sys->skeleton.b_create )
{
- for( i = 0; i < p_mux->i_nb_inputs; i++ )
+ for( int i = 0; i < p_mux->i_nb_inputs; i++ )
{
sout_input_t *p_input = p_mux->pp_inputs[i];
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
@@ -1144,7 +1143,7 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
p_hdr = NULL;
/* Create indexes if any */
- for( i = 0; i < p_mux->i_nb_inputs; i++ )
+ for( int i = 0; i < p_mux->i_nb_inputs; i++ )
{
sout_input_t *p_input = p_mux->pp_inputs[i];
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
@@ -1177,7 +1176,7 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
}
/* Take care of the non b_o_s headers */
- for( i = 0; i < p_mux->i_nb_inputs; i++ )
+ for( int i = 0; i < p_mux->i_nb_inputs; i++ )
{
sout_input_t *p_input = p_mux->pp_inputs[i];
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
@@ -1197,11 +1196,11 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
/* Special case, headers are already there in the incoming stream.
* We need to gather them an mark them as headers. */
- for( unsigned i = 1; i < i_count; i++ )
+ for( unsigned j = 1; j < i_count; j++ )
{
- op.bytes = pi_size[i];
- op.packet = pp_data[i];
- if( pi_size[i] <= 0 )
+ op.bytes = pi_size[j];
+ op.packet = pp_data[j];
+ if( pi_size[j] <= 0 )
msg_Err( p_mux, "header data corrupted");
op.b_o_s = 0;
@@ -1210,7 +1209,7 @@ static bool OggCreateHeaders( sout_mux_t *p_mux )
op.packetno = p_stream->i_packet_no++;
ogg_stream_packetin( &p_stream->os, &op );
msg_Dbg( p_mux, "adding non bos, secondary header" );
- if( i == i_count - 1 )
+ if( j == i_count - 1 )
p_og = OggStreamFlush( p_mux, &p_stream->os, 0 );
else
p_og = OggStreamPageOut( p_mux, &p_stream->os, 0 );
More information about the vlc-commits
mailing list