summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-16 00:23:48 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 05:09:33 +0100
commit41457e536c059d265844b1a66c906a9a842f73ab (patch)
tree8f8dcf283495d395d458e39c2892fae03d8fab29 /libavformat/mux.c
parent20b0d24c2f7ae86cebeb17399a2fea3a7e3d0f69 (diff)
downloadffmpeg-41457e536c059d265844b1a66c906a9a842f73ab.tar.gz
avformat/mux, mxfenc: Don't use sizeof(AVPacket)
This removes one of the last usages of sizeof(AVPacket) in the generic muxing code. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index d93dc73f8e..3ba95d28c6 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1014,15 +1014,9 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
AVStream *const st = s->streams[pktl->pkt.stream_index];
FFStream *const sti = ffstream(st);
- *pkt = pktl->pkt;
-
- si->packet_buffer = pktl->next;
- if (!si->packet_buffer)
- si->packet_buffer_end = NULL;
-
if (sti->last_in_packet_buffer == pktl)
sti->last_in_packet_buffer = NULL;
- av_freep(&pktl);
+ avpriv_packet_list_get(&si->packet_buffer, &si->packet_buffer_end, pkt);
return 1;
} else {