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:
parent
b74e47c4ff
commit
d61240f8c9
20 changed files with 153 additions and 175 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/bsf.h"
|
||||
#include "libavcodec/packet_internal.h"
|
||||
|
||||
#include "avformat.h"
|
||||
#include "os_support.h"
|
||||
|
@ -92,8 +93,7 @@ typedef struct FFFormatContext {
|
|||
* not decoded, for example to get the codec parameters in MPEG
|
||||
* streams.
|
||||
*/
|
||||
struct PacketList *packet_buffer;
|
||||
struct PacketList *packet_buffer_end;
|
||||
PacketList packet_buffer;
|
||||
|
||||
/* av_seek_frame() support */
|
||||
int64_t data_offset; /**< offset of the first packet */
|
||||
|
@ -104,13 +104,11 @@ typedef struct FFFormatContext {
|
|||
* be identified, as parsing cannot be done without knowing the
|
||||
* codec.
|
||||
*/
|
||||
struct PacketList *raw_packet_buffer;
|
||||
struct PacketList *raw_packet_buffer_end;
|
||||
PacketList raw_packet_buffer;
|
||||
/**
|
||||
* Packets split by the parser get queued here.
|
||||
*/
|
||||
struct PacketList *parse_queue;
|
||||
struct PacketList *parse_queue_end;
|
||||
PacketList parse_queue;
|
||||
/**
|
||||
* The generic code uses this as a temporary packet
|
||||
* to parse packets or for muxing, especially flushing.
|
||||
|
@ -393,7 +391,7 @@ typedef struct FFStream {
|
|||
/**
|
||||
* last packet in packet_buffer for this stream when muxing.
|
||||
*/
|
||||
struct PacketList *last_in_packet_buffer;
|
||||
PacketListEntry *last_in_packet_buffer;
|
||||
|
||||
int64_t last_IP_pts;
|
||||
int last_IP_duration;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue