]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mux: Remove unnecessary unreferencing of AVPacket
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 9 May 2020 19:26:30 +0000 (21:26 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 23 May 2020 03:43:42 +0000 (05:43 +0200)
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>
libavformat/mux.c

index b08d48b5fb873239712594f1b0c0600a736bef97..44d5e5d1c0b9d6d27dae58558b7971e95ab768b0 100644 (file)
@@ -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);
 }