diff options
author | James Almer <jamrial@gmail.com> | 2022-03-18 18:46:40 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-18 18:59:03 -0300 |
commit | 327efa66331ebdc0087c6b656059a8df2f404019 (patch) | |
tree | 2da7583711b1f0aa2f5c22624f38ef1cbe2e54a6 /libavutil/opt.c | |
parent | 710e51677a6f3a5c2b37dc31a597957a22a5e531 (diff) | |
download | ffmpeg-327efa66331ebdc0087c6b656059a8df2f404019.tar.gz |
avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()
Fixes potential memleaks for existing options of this type.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 445537fbad..8ffb10449b 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1729,6 +1729,10 @@ void av_opt_free(void *obj) av_dict_free((AVDictionary **)(((uint8_t *)obj) + o->offset)); break; + case AV_OPT_TYPE_CHLAYOUT: + av_channel_layout_uninit((AVChannelLayout *)(((uint8_t *)obj) + o->offset)); + break; + default: break; } |