[vlc-commits] transcode: audio: use ARRAY_SIZE

Francois Cartegnie git at videolan.org
Mon Jul 9 16:15:31 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jun 26 15:56:39 2018 +0200| [55fa51e70855779981a64f49e6b25b9c24fb2fe3] | committer: Francois Cartegnie

transcode: audio: use ARRAY_SIZE

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

 modules/stream_out/transcode/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index d996c66e53..dbe2fb012b 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -152,7 +152,7 @@ static int transcode_audio_initialize_encoder( sout_stream_id_sys_t *id, sout_st
     p_enc_in->i_format = id->p_encoder->fmt_in.i_codec;
     if( !p_enc_in->i_physical_channels )
     {
-        if( p_enc_in->i_channels < (sizeof(pi_channels_maps) / sizeof(*pi_channels_maps)) )
+        if( p_enc_in->i_channels < ARRAY_SIZE(pi_channels_maps) )
             p_enc_in->i_physical_channels = pi_channels_maps[p_enc_in->i_channels];
     }
     aout_FormatPrepare( p_enc_in );



More information about the vlc-commits mailing list