aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-05-06 12:38:44 -0300
committerJames Almer <jamrial@gmail.com>2024-05-07 20:11:42 -0300
commit4e069ba80abe81ed64b20125232ca5be3fdf6ceb (patch)
tree5258512fe940169591437df69b4c74a73e2fe94a
parentae0293ee411f868d9665104a6678bebcf09d15b1 (diff)
downloadffmpeg-4e069ba80abe81ed64b20125232ca5be3fdf6ceb.tar.gz
avutil/opt: free the temporary layout in av_opt_is_set_to_default()
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavutil/opt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index d31a8bfbf1..32a9e059e3 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -2309,7 +2309,9 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o)
if ((ret = av_channel_layout_from_string(&ch_layout, o->default_val.str)) < 0)
return ret;
}
- return !av_channel_layout_compare((AVChannelLayout *)dst, &ch_layout);
+ ret = !av_channel_layout_compare((AVChannelLayout *)dst, &ch_layout);
+ av_channel_layout_uninit(&ch_layout);
+ return ret;
}
case AV_OPT_TYPE_STRING:
str = *(char **)dst;