[FFmpeg-cvslog] avformat/mux: Use AVFormatInternal.parse_pkt for temporary packets
Andreas Rheinhardt
git at videolan.org
Sun Oct 3 23:48:42 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Sep 5 19:05:01 2021 +0200| [2ce6a9f8470f75b8c12c7a21ecc724f1140d8c62] | committer: Andreas Rheinhardt
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 <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ce6a9f8470f75b8c12c7a21ecc724f1140d8c62
---
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) {
More information about the ffmpeg-cvslog
mailing list