summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-14 05:30:15 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-17 00:09:08 +0200
commitf9215d0bb20242299f3654fd4646511665b20c4c (patch)
tree0f6583a5862b91392fffd204a0ad358e3c3ec5e1 /libavcodec/ffv1enc.c
parenta0750f412ade5a969b1f90e038d707d531c97342 (diff)
avcodec/ffv1enc: Fix memleaks on init failure
The FFV1 encoder has so far not cleaned up after itself in this case; but it can be done easily by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 97dc15eac9..611b250e96 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1354,4 +1354,5 @@ AVCodec ff_ffv1_encoder = {
.defaults = ffv1_defaults,
#endif
.priv_class = &ffv1_class,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};