aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-05 23:18:29 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-03 20:56:05 +0200
commitc2bb05497911a0900b745eaa4a7f05d72b3610ef (patch)
tree4c7e4eb27b0ff755ee3f352d69e668ab910f9160
parenteadb1cd6f85178231259878f01890be9dbb0f222 (diff)
downloadffmpeg-c2bb05497911a0900b745eaa4a7f05d72b3610ef.tar.gz
avformat/internal: Allow AVFormatInternal.pkt to be used by muxers
It is unused by the generic muxing code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavformat/internal.h4
-rw-r--r--libavformat/mux.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 98341ba217..f1ae7db365 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -121,7 +121,9 @@ typedef struct FFFormatContext {
AVPacket *parse_pkt;
/**
- * Used to hold temporary packets.
+ * Used to hold temporary packets for the generic demuxing code.
+ * When muxing, it may be used by muxers to hold packets (even
+ * permanent ones).
*/
AVPacket *pkt;
/**
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 3d007ec943..be9ba88365 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1292,6 +1292,7 @@ int av_write_trailer(AVFormatContext *s)
if (s->oformat->priv_class)
av_opt_free(s->priv_data);
av_freep(&s->priv_data);
+ av_packet_unref(si->pkt);
return ret;
}