History

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.

James Almer committed 3 years ago

Commit 95b5c811 parent 36552911 file · +3 −4Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/extract_extradata_bsf.c+3−4
@@ -49,10 +49,9 @@ typedef struct ExtractExtradataContext { · 48 unmodified lines
49 int remove;49 int remove;
50} ExtractExtradataContext;50} ExtractExtradataContext;
51 51
52static int val_in_array(const int *arr, int len, int val)52static int val_in_array(const int *arr, size_t len, int val)
53{53{
54 int i;54 for (size_t i = 0; i < len; i++)
55 for (i = 0; i < len; i++)
56 if (arr[i] == val)55 if (arr[i] == val)
57 return 1;56 return 1;
58 return 0;57 return 0;
@@ -177,7 +176,7 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt, · 118 unmodified lines
177 176
178 int extradata_size = 0, filtered_size = 0;177 int extradata_size = 0, filtered_size = 0;
179 const int *extradata_nal_types;178 const int *extradata_nal_types;
180 int nb_extradata_nal_types;179 size_t nb_extradata_nal_types;
181 int i, has_sps = 0, has_vps = 0, ret = 0;180 int i, has_sps = 0, has_vps = 0, ret = 0;
182 181
183 if (ctx->par_in->codec_id == AV_CODEC_ID_VVC) {182 if (ctx->par_in->codec_id == AV_CODEC_ID_VVC) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t