diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-27 17:21:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-11 22:43:14 +0200 |
commit | 39ff027fd81185d0f8b4dfd49e709f4d0d44e2de (patch) | |
tree | 0b45eebdeb09e038235337e428ec7a326790641a /libavcodec | |
parent | e1255789941d213a8e193469d0687946c9fa4a63 (diff) | |
download | ffmpeg-39ff027fd81185d0f8b4dfd49e709f4d0d44e2de.tar.gz |
avcodec/mpeg12enc: Add FF_CODEC_CAP_INIT_CLEANUP
Fixes: Multiple memleaks
Fixes: ffmpeg-memory-leak
Found-by: Francis Provencher <francis@protekresearchlab.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg12enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 2bc5289d63..cbf2f6fa03 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -1193,6 +1193,7 @@ AVCodec ff_mpeg1video_encoder = { .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .priv_class = &mpeg1_class, }; @@ -1210,5 +1211,6 @@ AVCodec ff_mpeg2video_encoder = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE }, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .priv_class = &mpeg2_class, }; |