[FFmpeg-devel] [PATCH] avcodec/encode: unref the packet on AVCodec.receive_packet() failure

Anton Khirnov anton at khirnov.net
Tue Sep 1 15:14:51 EEST 2020


Quoting James Almer (2020-08-31 04:59:54)
> Fixes memleaks with some encoders that don't unref the packet before
> returning.
> This is consistent with the behavior of AVCodec.encode()
> implementations in encode_simple_internal().
> 
> Found-by: mkver
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/encode.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Looks ok.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list