aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-09 21:26:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-23 05:43:42 +0200
commit06fdc823371d295a6f29993e5c2e9ed7df3610d2 (patch)
tree3595efd1da99d2d3269362607e9eb5540d96b6d2 /libavformat
parent9dd8f7312a7702240c8a7f8d0f6515a3cfc80f19 (diff)
downloadffmpeg-06fdc823371d295a6f29993e5c2e9ed7df3610d2.tar.gz
avformat/mux: Remove unnecessary unreferencing of AVPacket
Since commit c5324d92c5f206dcdc2cf93ae237eaa7c1ad0a40 all custom interleave_packet() functions always return clean packets (even on error), so that unreferencing manually can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mux.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index b08d48b5fb..44d5e5d1c0 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1067,10 +1067,7 @@ int ff_interleaved_peek(AVFormatContext *s, int stream,
static int interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *in, int flush)
{
if (s->oformat->interleave_packet) {
- int ret = s->oformat->interleave_packet(s, out, in, flush);
- if (in)
- av_packet_unref(in);
- return ret;
+ return s->oformat->interleave_packet(s, out, in, flush);
} else
return ff_interleave_packet_per_dts(s, out, in, flush);
}