mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Prevent using uninitialized memory
This commit is contained in:
parent
e45c6a9c68
commit
2424a976a4
|
@ -1759,7 +1759,10 @@ static void search_pu_inter(encoder_state_t * const state,
|
|||
kvz_sort_keys_by_cost(&amvp[0]);
|
||||
kvz_sort_keys_by_cost(&amvp[1]);
|
||||
|
||||
int best_keys[2] = { amvp[0].keys[0], amvp[1].keys[0] };
|
||||
int best_keys[2] = {
|
||||
amvp[0].size > 0 ? amvp[0].keys[0] : 0,
|
||||
amvp[1].size > 0 ? amvp[1].keys[0] : 0
|
||||
};
|
||||
|
||||
cu_info_t *best_unipred[2] = {
|
||||
&amvp[0].unit[best_keys[0]],
|
||||
|
|
Loading…
Reference in a new issue