summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-03-05 11:26:24 -0300
committerJames Almer <jamrial@gmail.com>2021-03-17 14:12:17 -0300
commitd422b2ed87ee7d3b3014cd3fac553e6aad7d4f14 (patch)
tree06b1f9e88cfab2675afd529468f47ab851f1bab3 /libavformat/mux.c
parentf7db77bd8785d1715d3e7ed7e69bd1cc991f2d07 (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 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 062ba8d789..440113b149 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -22,6 +22,7 @@
#include "avformat.h"
#include "internal.h"
#include "libavcodec/internal.h"
+#include "libavcodec/packet_internal.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/pixdesc.h"
@@ -830,11 +831,11 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
int (*compare)(AVFormatContext *, const AVPacket *, const AVPacket *))
{
int ret;
- AVPacketList **next_point, *this_pktl;
+ PacketList **next_point, *this_pktl;
AVStream *st = s->streams[pkt->stream_index];
int chunked = s->max_chunk_size || s->max_chunk_duration;
- this_pktl = av_malloc(sizeof(AVPacketList));
+ this_pktl = av_malloc(sizeof(PacketList));
if (!this_pktl) {
av_packet_unref(pkt);
return AVERROR(ENOMEM);
@@ -931,7 +932,7 @@ static int interleave_compare_dts(AVFormatContext *s, const AVPacket *next,
int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
AVPacket *pkt, int flush)
{
- AVPacketList *pktl;
+ PacketList *pktl;
int stream_count = 0;
int noninterleaved_count = 0;
int i, ret;
@@ -968,7 +969,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
for (i = 0; i < s->nb_streams; i++) {
int64_t last_dts;
- const AVPacketList *last = s->streams[i]->internal->last_in_packet_buffer;
+ const PacketList *last = s->streams[i]->internal->last_in_packet_buffer;
if (!last)
continue;
@@ -1064,7 +1065,7 @@ int ff_get_muxer_ts_offset(AVFormatContext *s, int stream_index, int64_t *offset
const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream)
{
- AVPacketList *pktl = s->internal->packet_buffer;
+ PacketList *pktl = s->internal->packet_buffer;
while (pktl) {
if (pktl->pkt.stream_index == stream) {
return &pktl->pkt;