diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-16 01:49:39 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-04 13:16:50 +0100 |
commit | d61240f8c95e9cf7a0aaef2bb4495960d3fec62c (patch) | |
tree | 52398ddaec0cbe4e02d0db54669ecd1532f1569e /libavformat/utils.c | |
parent | b74e47c4ff5bca998936c0d8b9a0892104a7403d (diff) | |
download | ffmpeg-d61240f8c95e9cf7a0aaef2bb4495960d3fec62c.tar.gz |
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/utils.c')
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index ca6185b5c3..e643821fc9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -239,7 +239,6 @@ int avformat_queue_attached_pictures(AVFormatContext *s) } ret = avpriv_packet_list_put(&si->raw_packet_buffer, - &si->raw_packet_buffer_end, &s->streams[i]->attached_pic, av_packet_ref, 0); if (ret < 0) @@ -300,9 +299,9 @@ int ff_is_intra_only(enum AVCodecID id) void ff_flush_packet_queue(AVFormatContext *s) { FFFormatContext *const si = ffformatcontext(s); - avpriv_packet_list_free(&si->parse_queue, &si->parse_queue_end); - avpriv_packet_list_free(&si->packet_buffer, &si->packet_buffer_end); - avpriv_packet_list_free(&si->raw_packet_buffer, &si->raw_packet_buffer_end); + avpriv_packet_list_free(&si->parse_queue); + avpriv_packet_list_free(&si->packet_buffer); + avpriv_packet_list_free(&si->raw_packet_buffer); si->raw_packet_buffer_size = 0; } |