Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions av2/encoder/global_motion_facade.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,15 @@ static AVM_INLINE void update_valid_ref_frames_for_gm(
(ref_disabled && cpi->sf.hl_sf.recode_loop != DISALLOW_RECODE)) {
continue;
} else {
// Get the scaled buffer
if (av2_is_scaled(get_ref_scale_factors(cm, frame)))
// Get the scaled buffer. av2_scale_references() leaves scaled_ref_buf[]
// NULL for a disabled reference, which the check above can let through,
// so skip rather than dereference NULL.
if (av2_is_scaled(get_ref_scale_factors(cm, frame))) {
if (cpi->scaled_ref_buf[frame] == NULL) continue;
ref_buf[frame] = &cpi->scaled_ref_buf[frame]->buf;
else
} else {
ref_buf[frame] = &buf->buf;
}
}

int prune_ref_frames =
Expand Down