summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-11-10 22:15:44 -0300
committerJames Almer <jamrial@gmail.com>2019-11-10 22:31:42 -0300
commit3a84081cbd982ce1bd9456eca5b1b03cd495e0fe (patch)
tree3f2b1fb3269b00d708bf1302eac168478d873abf
parentd8bf24459b694338de4ceb2a2e6d4d2949d6658d (diff)
downloadffmpeg-streaming-3a84081cbd982ce1bd9456eca5b1b03cd495e0fe.zip
ffmpeg-streaming-3a84081cbd982ce1bd9456eca5b1b03cd495e0fe.tar.gz
avcodec/librav1e: free the RaPacket after using it
Fixes leaks. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/librav1e.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c
index f65d784..5052cac 100644
--- a/libavcodec/librav1e.c
+++ b/libavcodec/librav1e.c
@@ -508,12 +508,12 @@ retry:
pkt->flags |= AV_PKT_FLAG_KEY;
pkt->pts = pkt->dts = rpkt->input_frameno * avctx->ticks_per_frame;
+ rav1e_packet_unref(rpkt);
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
int ret = av_bsf_send_packet(ctx->bsf, pkt);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "extradata extraction send failed.\n");
- rav1e_packet_unref(rpkt);
av_packet_unref(pkt);
return ret;
}
@@ -521,7 +521,6 @@ retry:
ret = av_bsf_receive_packet(ctx->bsf, pkt);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "extradata extraction receive failed.\n");
- rav1e_packet_unref(rpkt);
av_packet_unref(pkt);
return ret;
}
OpenPOWER on IntegriCloud