History

avfilter/vf_mestimate: Check b_count

Fixes: left shift of negative value -1 Fixes: Ticket8270

Michael Niedermayer committed 5 years ago

Commit 06af6e11 parent 012804d1 file · +3 −0Browse files

Unified · Split

libavfilter/vf_mestimate.c+3−0
@@ -100,6 +100,9 @@ static int config_input(AVFilterLink *inlink) · 99 unmodified lines
100 s->b_height = inlink->h >> s->log2_mb_size;100 s->b_height = inlink->h >> s->log2_mb_size;
101 s->b_count = s->b_width * s->b_height;101 s->b_count = s->b_width * s->b_height;
102 102
103 if (s->b_count == 0)
104 return AVERROR(EINVAL);
105
103 for (i = 0; i < 3; i++) {106 for (i = 0; i < 3; i++) {
104 s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0]));107 s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0]));
105 if (!s->mv_table[i])108 if (!s->mv_table[i])

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