summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-16 01:49:39 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 13:16:50 +0100
commitd61240f8c95e9cf7a0aaef2bb4495960d3fec62c (patch)
tree52398ddaec0cbe4e02d0db54669ecd1532f1569e /libavformat/movenc.c
parentb74e47c4ff5bca998936c0d8b9a0892104a7403d (diff)
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>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5d4429b82e..ab33371296 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -5339,7 +5339,7 @@ static int mov_write_squashed_packet(AVFormatContext *s, MOVTrack *track)
switch (track->st->codecpar->codec_id) {
case AV_CODEC_ID_TTML: {
- int had_packets = !!track->squashed_packet_queue;
+ int had_packets = !!track->squashed_packet_queue.head;
if ((ret = ff_mov_generate_squashed_ttml_packet(s, track, squashed_packet)) < 0) {
goto finish_squash;
@@ -6190,7 +6190,6 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* The following will reset pkt and is only allowed to be used
* because we return immediately. afterwards. */
if ((ret = avpriv_packet_list_put(&trk->squashed_packet_queue,
- &trk->squashed_packet_queue_end,
pkt, NULL, 0)) < 0) {
return ret;
}
@@ -6478,8 +6477,7 @@ static void mov_free(AVFormatContext *s)
ff_mov_cenc_free(&track->cenc);
ffio_free_dyn_buf(&track->mdat_buf);
- avpriv_packet_list_free(&track->squashed_packet_queue,
- &track->squashed_packet_queue_end);
+ avpriv_packet_list_free(&track->squashed_packet_queue);
}
av_freep(&mov->tracks);