diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-24 13:37:28 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-17 04:43:04 +0200 |
commit | dfbf41775cb58a9218a8b39b0dc6fd8de3f1ab35 (patch) | |
tree | 46e27cef52cd1bb4c58a41bbb86ebcd6e6b12601 /libavformat/mxfenc.c | |
parent | eaacb5c513512b13140d161cd038a845d87ae0d9 (diff) |
avformat/mux, mxfenc, utils: Use dedicated pointer for AVFormatInternal
This gets rid of ugly "->internal" and is in preparation for removing
AVFormatInternal altogether.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r-- | libavformat/mxfenc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 229817dba6..36f334adbf 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -3100,13 +3100,14 @@ static void mxf_deinit(AVFormatContext *s) static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) { + AVFormatInternal *const si = s->internal; int i, stream_count = 0; for (i = 0; i < s->nb_streams; i++) stream_count += !!s->streams[i]->internal->last_in_packet_buffer; if (stream_count && (s->nb_streams == stream_count || flush)) { - PacketList *pktl = s->internal->packet_buffer; + PacketList *pktl = si->packet_buffer; if (s->nb_streams != stream_count) { PacketList *last = NULL; // find last packet in edit unit @@ -3130,20 +3131,20 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket if (last) last->next = NULL; else { - s->internal->packet_buffer = NULL; - s->internal->packet_buffer_end= NULL; + si->packet_buffer = NULL; + si->packet_buffer_end = NULL; goto out; } - pktl = s->internal->packet_buffer; + pktl = si->packet_buffer; } *out = pktl->pkt; av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts); - s->internal->packet_buffer = pktl->next; + si->packet_buffer = pktl->next; if(s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer == pktl) s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer= NULL; - if(!s->internal->packet_buffer) - s->internal->packet_buffer_end= NULL; + if (!si->packet_buffer) + si->packet_buffer_end = NULL; av_freep(&pktl); return 1; } else { |