Skip to content

[AV1 Encode] Handle allocation failures safely - #386

Open
fjdoria76 wants to merge 1 commit into
intel:mainfrom
fjdoria76:fjdoria76-fix-issue-371
Open

[AV1 Encode] Handle allocation failures safely#386
fjdoria76 wants to merge 1 commit into
intel:mainfrom
fjdoria76:fjdoria76-fix-issue-371

Conversation

@fjdoria76

Copy link
Copy Markdown

Concurrent AV1/QSV workloads can exhaust system or GPU memory and currently allow allocation failures to surface as invalid-resource use or a segmentation fault. This is reported in issue #371 for Jellyfin/FFmpeg on Arc A750.

The change hardens the AV1 encode paths by:

  • Translating host allocation failures into MFX_ERR_MEMORY_ALLOC.
  • Cleaning up partially allocated encode-control buffers and VA buffers.
  • Releasing surface references when per-task allocation fails.
  • Propagating segmentation-map allocation failures.
  • Converting std::bad_alloc at AV1 init, frame submission, and async execution boundaries into Media SDK errors.

Validation: git diff --check passes. An isolated CMake build was attempted but compilation is blocked in this macOS environment because va/va_version.h is unavailable.

Fixes: #371

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@fjdoria76

Copy link
Copy Markdown
Author

hi

@fjdoria76

Copy link
Copy Markdown
Author

Hi! Thanks for stopping by. No action is needed for this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:

1 participant