Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A significant breaking change is coming to the FFmpeg API in the next major version bump of libavcodec, which is expected to occur with the release of FFmpeg 8 sometime in the next few months. See #778 for more details.
AVPacket
) is being removed from the public ABI. The FFmpeg developers want to add fields to the end of the struct without bumping the major version. This means that calling applications should not allocate theAVPacket
structure, but instead useav_packet_alloc
to let FFmpeg allocate it. Otherwise, there is a risk of a segfault.av_init_packet
is being removed (av_packet_alloc
takes over this functionality).AVPacketList
is being removedNew code is added to use the FFmpeg allocator for
TAVPacket
, and operate onPAVPacket
instead ofTAVPacket
. A custom record typeTPacketList
was introduced to replaceTAVPacketList
, which fulfills the same purpose. The necessary changes were implemented for FFmpeg 7, and can be carried over for FFmpeg 8 when the time comes.I've done some testing locally on both Linux and Windows. Everything is working on my end and I haven't detected any memory leaks.
Fixes #778