mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue