[vlc-commits] mux/ogg: fix variable shadowing
Rémi Denis-Courmont
git at videolan.org
Wed Aug 14 18:24:21 CEST 2019
vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 2 21:24:34 2019 +0200| [afe59f492e172f770fd1ba9083a02e48e692aded] | committer: Hugo Beauzée-Luyssen
mux/ogg: fix variable shadowing
(cherry picked from commit c48f56ff7f560d7239ff274d9ab84649d81c5d94)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=afe59f492e172f770fd1ba9083a02e48e692aded
---
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 72d843c7f7..815da2e10d 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -941,7 +941,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,
@@ -997,7 +996,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;
@@ -1116,7 +1115,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;
@@ -1145,7 +1144,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;
@@ -1178,7 +1177,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;
@@ -1198,11 +1197,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;
@@ -1211,7 +1210,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