Skip to content

Conversation

@WyattBlue
Copy link
Member

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants