Add av_packet_free() to free pkt_au in the error paths.
Fixes: cfe2947887 ("avcodec/evc_decoder: Provided support for EVC decoder")
Signed-off-by: Jiasheng Jiang <[email protected]>
---
libavcodec/libxevd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
index 520fdab7d8..87f6eb129c 100644
--- a/libavcodec/libxevd.c
+++ b/libavcodec/libxevd.c
@@ -402,6 +402,7 @@ static int libxevd_receive_frame(AVCodecContext *avctx,
AVFrame *frame)
return AVERROR_EXTERNAL;
} else if (xevd_ret == XEVD_OK_FRM_DELAYED) {
if(bs_read_pos == pkt_au->size) {
+ av_packet_free(&pkt_au);
return AVERROR(EAGAIN);
}
} else { // XEVD_OK
@@ -422,6 +423,7 @@ static int libxevd_receive_frame(AVCodecContext *avctx,
AVFrame *frame)
}
}
}
+ av_packet_free(&pkt_au);
} else { // decoder draining mode handling
xevd_ret = xevd_pull(xectx->id, &imgb);
--
2.25.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".