]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flacenc: Fix memleak upon init error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 29 Nov 2020 21:28:37 +0000 (22:28 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Fri, 2 Apr 2021 16:55:27 +0000 (18:55 +0200)
An AVMD5 struct would leak if an error happened after its allocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/flacenc.c

index 34fcd957952c330433dbb86150dd8df326730ebe..05a85d830fe0b98f5e4726b8178d8b22250c443c 100644 (file)
@@ -1513,4 +1513,5 @@ AVCodec ff_flac_encoder = {
                                                      AV_SAMPLE_FMT_S32,
                                                      AV_SAMPLE_FMT_NONE },
     .priv_class     = &flac_encoder_class,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };