From 2ce6a9f8470f75b8c12c7a21ecc724f1140d8c62 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 5 Sep 2021 19:05:01 +0200 Subject: [PATCH] avformat/mux: Use AVFormatInternal.parse_pkt for temporary packets The documentation of said packet ("Every user has to ensure that this packet is blank after using it") perfectly fits how we use said packet in the generic muxing code. Better than the documentation of pkt. Signed-off-by: Andreas Rheinhardt --- libavformat/mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index d924bb08fc..3d007ec943 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1188,7 +1188,7 @@ static int write_packets_common(AVFormatContext *s, AVPacket *pkt, int interleav int av_write_frame(AVFormatContext *s, AVPacket *in) { FFFormatContext *const si = ffformatcontext(s); - AVPacket *pkt = si->pkt; + AVPacket *pkt = si->parse_pkt; int ret; if (!in) { @@ -1252,7 +1252,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) int av_write_trailer(AVFormatContext *s) { FFFormatContext *const si = ffformatcontext(s); - AVPacket *const pkt = si->pkt; + AVPacket *const pkt = si->parse_pkt; int ret1, ret = 0; av_packet_unref(pkt); @@ -1344,7 +1344,7 @@ static int write_uncoded_frame_internal(AVFormatContext *s, int stream_index, AVFrame *frame, int interleaved) { FFFormatContext *const si = ffformatcontext(s); - AVPacket *pkt = si->pkt; + AVPacket *pkt = si->parse_pkt; av_assert0(s->oformat); if (!s->oformat->write_uncoded_frame) {