[vlc-commits] access/jack: narrow scope of variable used in iteration

Filip Roséen git at videolan.org
Wed Oct 12 10:04:39 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Tue Oct 11 20:06:22 2016 +0200| [647f5b4255a5b3461ba824a6f2cd1d60b816cb86] | committer: Thomas Guillem

access/jack: narrow scope of variable used in iteration

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=647f5b4255a5b3461ba824a6f2cd1d60b816cb86
---

 modules/access/jack.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/access/jack.c b/modules/access/jack.c
index 8a33999..c275e54 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -401,8 +401,7 @@ int Process( jack_nframes_t i_frames, void *p_arg )
 {
     demux_t            *p_demux = ( demux_t* )p_arg;
     demux_sys_t        *p_sys = p_demux->p_sys;
-    size_t              i_write;
- 
+
     /* Get and interlace buffers */
     for ( unsigned i = 0; i < p_sys->i_channels ; i++ )
     {
@@ -420,9 +419,9 @@ int Process( jack_nframes_t i_frames, void *p_arg )
                 msg_Err( p_demux, "buffer overflow");
                 return 0; // buffer overflow
             }
-            i_write = jack_ringbuffer_write( p_sys->p_jack_ringbuffer,
-                                             ( char * ) (p_sys->pp_jack_buffer[i]+j),
-                                             p_sys->jack_sample_size );
+            size_t i_write = jack_ringbuffer_write( p_sys->p_jack_ringbuffer,
+                                                    ( char * ) (p_sys->pp_jack_buffer[i]+j),
+                                                    p_sys->jack_sample_size );
             if (i_write != p_sys->jack_sample_size ) {
                 msg_Warn( p_demux, "error writing on ring buffer");
             }



More information about the vlc-commits mailing list