avcodec/avformat: Unavpriv avpriv_packet_list_*()

The avpriv_packet_list_put/get/free() functions and the PacketList type
were implemented in libavcodec and exported via the avpriv_ mechanism
solely so that libavformat (and decklink in libavdevice) could use them;
libavcodec itself has no users of them. Exporting them across the library
boundary has the usual drawbacks for shared builds (export/import overhead
and having to keep them around for ABI stability even once unneeded).

Move the implementation and the PacketList/PacketListEntry types to
libavformat and rename the functions to ff_packet_list_*(). libavformat is
the primary user and compiles the new packet_list.c directly; decklink,
the only libavdevice user, gets a private copy for shared builds via the
SHLIBOBJS scheme already used for reverse.o and ccfifo.o (static builds
resolve the symbols from libavformat).

AVPACKET_IS_EMPTY() and ff_side_data_set_prft() remain in
libavcodec/packet_internal.h as they are libavcodec-internal.
This commit is contained in:
Michael Niedermayer
2026-06-21 12:39:23 +02:00
committed by Andreas Rheinhardt
parent 2d3776b8cc
commit 54849fe663
26 changed files with 268 additions and 183 deletions

View File

@@ -39,7 +39,7 @@ extern "C" {
extern "C" {
#include "config.h"
#include "libavcodec/packet_internal.h"
#include "libavformat/packet_internal.h"
#include "libavformat/avformat.h"
#include "libavutil/avassert.h"
#include "libavutil/avutil.h"