Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

Use zero-copy for Packet init from buffer data#2119

Merged
WyattBlue merged 1 commit intomain from
patch
Jan 23, 2026
Merged

Use zero-copy for Packet init from buffer data #2119
WyattBlue merged 1 commit intomain from
patch

Conversation

@WyattBlue
Copy link
Member

@WyattBlue WyattBlue commented Jan 23, 2026

Instead of allocating new memory and copying data when creating a Packet from a buffer (bytes, numpy array, etc.), reference the source buffer directly using av_buffer_create with a noop_free callback. The ByteSource is stored in self.source to keep the Python buffer alive.

Instead of allocating new memory and copying data when creating a
Packet from a buffer (bytes, numpy array, etc.), reference the source
buffer directly using av_buffer_create with a noop_free callback.
The ByteSource is stored in self.source to keep the Python buffer alive.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@WyattBlue WyattBlue merged commit e4bfc34 into main Jan 23, 2026
5 checks passed
@WyattBlue WyattBlue deleted the patch branch January 23, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /