diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-10-13 10:31:51 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-10-16 16:29:12 +0200 |
commit | cb80ec0b6cd7f954839427b4c86958d1475f2df4 (patch) | |
tree | 87f883d47797685932769337434ff825649e8e2b /libavformat/avformat.c | |
parent | 6d05e7e314207209200566f5b6fb0a77bc968028 (diff) | |
download | ffmpeg-cb80ec0b6cd7f954839427b4c86958d1475f2df4.tar.gz |
lavf: move demuxing-specific fields from FFFormatContext to FormatContextInternal
Diffstat (limited to 'libavformat/avformat.c')
-rw-r--r-- | libavformat/avformat.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavformat/avformat.c b/libavformat/avformat.c index 48acef72e5..eb9afad837 100644 --- a/libavformat/avformat.c +++ b/libavformat/avformat.c @@ -137,12 +137,13 @@ void ff_remove_stream_group(AVFormatContext *s, AVStreamGroup *stg) /* XXX: suppress the packet queue */ void ff_flush_packet_queue(AVFormatContext *s) { - FFFormatContext *const si = ffformatcontext(s); - avpriv_packet_list_free(&si->parse_queue); + FormatContextInternal *const fci = ff_fc_internal(s); + FFFormatContext *const si = &fci->fc; + avpriv_packet_list_free(&fci->parse_queue); avpriv_packet_list_free(&si->packet_buffer); - avpriv_packet_list_free(&si->raw_packet_buffer); + avpriv_packet_list_free(&fci->raw_packet_buffer); - si->raw_packet_buffer_size = 0; + fci->raw_packet_buffer_size = 0; } void avformat_free_context(AVFormatContext *s) @@ -191,7 +192,8 @@ void avformat_free_context(AVFormatContext *s) av_packet_free(&si->parse_pkt); av_freep(&s->streams); av_freep(&s->stream_groups); - ff_flush_packet_queue(s); + if (s->iformat) + ff_flush_packet_queue(s); av_freep(&s->url); av_free(s); } |