Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for size of struct AVPacket becoming private #778

Open
s09bQ5 opened this issue Nov 25, 2023 · 0 comments
Open

Prepare for size of struct AVPacket becoming private #778

s09bQ5 opened this issue Nov 25, 2023 · 0 comments

Comments

@s09bQ5
Copy link
Collaborator

s09bQ5 commented Nov 25, 2023

The next time the major version of libavcodec is increased, the size of struct AVPacket will no longer be part of the public API. av_init_packet and struct AVPacketList will vanish. This part of the API has been marked as deprecated in 2021.

There is a single file where we use these. Our TPacketQueue uses AVPacketList and we temporarily allocate status packets with av_malloc right before they are added to the queue.

To fix this the queue should be switched to a custom record type that contains a pointer to an AVPacket. The queue should no longer copy the packet structure and instead increase its reference count. The PutStatus method should switch to av_packet_alloc.

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

No branches or pull requests

1 participant