mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08: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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user