From: Steve Lhomme Date: Fri, 6 Jan 2023 09:16:09 +0000 (+0100) Subject: avcodec: use ARRAY_SIZE instead of custom code X-Git-Tag: archive/raspbian/3.0.21-6+rpi1^2~36 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=81f18d76e8decd65a7beece575547742ed42bc85;p=vlc.git avcodec: use ARRAY_SIZE instead of custom code (cherry picked from commit 28c80ee47e6cdf961f501eed9d4837956b38afd1) Gbp-Pq: Name 0089-avcodec-use-ARRAY_SIZE-instead-of-custom-code.patch --- diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c index e8436754..20744010 100644 --- a/modules/codec/avcodec/audio.c +++ b/modules/codec/avcodec/audio.c @@ -558,7 +558,7 @@ vlc_fourcc_t GetVlcAudioFormat( int fmt ) [AV_SAMPLE_FMT_FLTP] = VLC_CODEC_FL32, [AV_SAMPLE_FMT_DBLP] = VLC_CODEC_FL64, }; - if( (sizeof(fcc) / sizeof(fcc[0])) > (unsigned)fmt ) + if( ARRAY_SIZE(fcc) > (unsigned)fmt ) return fcc[fmt]; return VLC_CODEC_S16N; }