avcodec/packet_internal: Add proper PacketList struct

Up until now, we had a PacketList structure which is actually
a PacketListEntry; a proper PacketList did not exist
and all the related functions just passed pointers to pointers
to the head and tail elements around. All these pointers were
actually consecutive elements of their containing structs,
i.e. the users already treated them as if they were a struct.

So add a proper PacketList struct and rename the current PacketList
to PacketListEntry; also make the functions use this structure
instead of the pair of pointers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-12-16 01:49:39 +01:00
parent b74e47c4ff
commit d61240f8c9
20 changed files with 153 additions and 175 deletions

View File

@ -29,6 +29,9 @@
#define IDeckLinkProfileAttributes IDeckLinkAttributes
#endif
extern "C" {
#include "libavcodec/packet_internal.h"
}
#include "libavutil/thread.h"
#include "decklink_common_c.h"
#if CONFIG_LIBKLVANC
@ -75,7 +78,7 @@ class decklink_output_callback;
class decklink_input_callback;
typedef struct AVPacketQueue {
PacketList *first_pkt, *last_pkt;
PacketList pkt_list;
int nb_packets;
unsigned long long size;
int abort_request;