From 81f18d76e8decd65a7beece575547742ed42bc85 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 6 Jan 2023 10:16:09 +0100 Subject: [PATCH] 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 --- modules/codec/avcodec/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2