[FFmpeg-cvslog] avutil/opt: free the temporary layout in av_opt_is_set_to_default()

James Almer git at videolan.org
Wed May 8 02:12:33 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon May  6 12:38:44 2024 -0300| [4e069ba80abe81ed64b20125232ca5be3fdf6ceb] | committer: James Almer

avutil/opt: free the temporary layout in av_opt_is_set_to_default()

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e069ba80abe81ed64b20125232ca5be3fdf6ceb
---

 libavutil/opt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list