1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri, 6 Jan 2023 10:16:09 +0100
Subject: avcodec: use ARRAY_SIZE instead of custom code
(cherry picked from commit 28c80ee47e6cdf961f501eed9d4837956b38afd1)
---
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 e843675..2074401 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;
}
|