]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_uspp: Fix leak of packet side data
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 12 Mar 2021 14:07:33 +0000 (15:07 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 12 Mar 2021 18:05:37 +0000 (19:05 +0100)
The uspp filter uses a special option ("no_bitstream") of
the Snow encoder to suppress it from generating output.
The filter therefore did not unref the packet after usage,
believing it to be blank. But this is wrong, as the Snow encoder
attaches quality stats side data to the packet.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/vf_uspp.c

index b77edeb244459ab3dab28d6b8add5ebcec1e8156..523e47c811d917e24d6496facd906301e6133750 100644 (file)
@@ -257,6 +257,7 @@ static void filter(USPPContext *p, uint8_t *dst[3], uint8_t *src[3],
             av_log(p->avctx_enc[i], AV_LOG_ERROR, "Encoding failed\n");
             continue;
         }
+        av_packet_unref(&pkt);
 
         p->frame_dec = p->avctx_enc[i]->coded_frame;