From 95b5c8172968e942704cb4eaceddf8730d9e501c Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 21 Sep 2023 22:02:52 -0300 Subject: [PATCH] avcodec/extract_extradata: use size_t as parameter type in val_in_array() It only gets passed the return value of FF_ARRAY_ELEMS(), which is a size_t. Signed-off-by: James Almer --- libavcodec/extract_extradata_bsf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/extract_extradata_bsf.c b/libavcodec/extract_extradata_bsf.c index efc843736b..baa629295f 100644 --- a/libavcodec/extract_extradata_bsf.c +++ b/libavcodec/extract_extradata_bsf.c @@ -49,10 +49,9 @@ typedef struct ExtractExtradataContext { int remove; } ExtractExtradataContext; -static int val_in_array(const int *arr, int len, int val) +static int val_in_array(const int *arr, size_t len, int val) { - int i; - for (i = 0; i < len; i++) + for (size_t i = 0; i < len; i++) if (arr[i] == val) return 1; return 0; @@ -177,7 +176,7 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt, int extradata_size = 0, filtered_size = 0; const int *extradata_nal_types; - int nb_extradata_nal_types; + size_t nb_extradata_nal_types; int i, has_sps = 0, has_vps = 0, ret = 0; if (ctx->par_in->codec_id == AV_CODEC_ID_VVC) {