Skip to content

Fix NULL dereference in global motion setup with frame resize - #5350

Merged
urvangjoshi merged 1 commit into
AOMediaCodec:mainfrom
xinzhao-apple:mr/avm-bugfix5
Aug 31, 2026
Merged

Fix NULL dereference in global motion setup with frame resize#5350
urvangjoshi merged 1 commit into
AOMediaCodec:mainfrom
xinzhao-apple:mr/avm-bugfix5

Conversation

@xinzhao-apple

Copy link
Copy Markdown
Contributor

update_valid_ref_frames_for_gm() dereferenced cpi->scaled_ref_buf[frame] without checking it, but av2_scale_references() leaves that entry NULL for a disabled reference, and the skip-invalid-refs check only skips disabled references when recode is allowed. Under frame resize at speed >= 6 that combination occurs and the encoder segfaults on the first inter frame. Add the missing NULL check.

Fix issue #5348.

update_valid_ref_frames_for_gm() dereferenced cpi->scaled_ref_buf[frame]
without checking it, but av2_scale_references() leaves that entry NULL for a
disabled reference, and the skip-invalid-refs check only skips disabled
references when recode is allowed. Under frame resize at speed >= 6 that
combination occurs and the encoder segfaults on the first inter frame. Add the
missing NULL check.
@urvangjoshi
urvangjoshi merged commit 00f6d7a into AOMediaCodec:main Aug 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants