diff options
author | James Almer <jamrial@gmail.com> | 2021-03-05 17:26:24 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-03-17 20:12:17 +0300 |
commit | d422b2ed87ee7d3b3014cd3fac553e6aad7d4f14 (patch) | |
tree | 06b1f9e88cfab2675afd529468f47ab851f1bab3 /libavcodec/packet_internal.h | |
parent | f7db77bd8785d1715d3e7ed7e69bd1cc991f2d07 (diff) |
avcodec/packet_internal: make avpriv_packet_list_* functions use an internal struct
The next pointer is kept at the end for backwards compatability until the
major bump, when it should ideally be moved at the front.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/packet_internal.h')
-rw-r--r-- | libavcodec/packet_internal.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/packet_internal.h b/libavcodec/packet_internal.h index 832ddb4a61..b1d91f6347 100644 --- a/libavcodec/packet_internal.h +++ b/libavcodec/packet_internal.h @@ -23,6 +23,10 @@ #include "packet.h" +typedef struct PacketList { + AVPacket pkt; + struct PacketList *next; +} PacketList; /** * Append an AVPacket to the list. @@ -37,7 +41,7 @@ * @return 0 on success, negative AVERROR value on failure. On failure, the packet and the list are unchanged. */ -int avpriv_packet_list_put(AVPacketList **head, AVPacketList **tail, +int avpriv_packet_list_put(PacketList **head, PacketList **tail, AVPacket *pkt, int (*copy)(AVPacket *dst, const AVPacket *src), int flags); @@ -54,7 +58,7 @@ int avpriv_packet_list_put(AVPacketList **head, AVPacketList **tail, * @return 0 on success, and a packet is returned. AVERROR(EAGAIN) if * the list was empty. */ -int avpriv_packet_list_get(AVPacketList **head, AVPacketList **tail, +int avpriv_packet_list_get(PacketList **head, PacketList **tail, AVPacket *pkt); /** @@ -63,7 +67,7 @@ int avpriv_packet_list_get(AVPacketList **head, AVPacketList **tail, * @param head List head element * @param tail List tail element */ -void avpriv_packet_list_free(AVPacketList **head, AVPacketList **tail); +void avpriv_packet_list_free(PacketList **head, PacketList **tail); int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type); |