[FFmpeg-cvslog] avcodec/extract_extradata: use size_t as parameter type in val_in_array()
James Almer
git at videolan.org
Fri Sep 22 04:05:52 EEST 2023
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Sep 21 22:02:52 2023 -0300| [95b5c8172968e942704cb4eaceddf8730d9e501c] | committer: James Almer
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 <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95b5c8172968e942704cb4eaceddf8730d9e501c
---
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) {
More information about the ffmpeg-cvslog
mailing list