[FFmpeg-cvslog] avutil/opt: propagate av_dict_copy() errors in av_opt_{get,set}_dict_val()
James Almer
git at videolan.org
Wed May 8 02:12:31 EEST 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon May 6 12:24:47 2024 -0300| [ae0293ee411f868d9665104a6678bebcf09d15b1] | committer: James Almer
avutil/opt: propagate av_dict_copy() errors in av_opt_{get,set}_dict_val()
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae0293ee411f868d9665104a6678bebcf09d15b1
---
libavutil/opt.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 60b0c2a946..d31a8bfbf1 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -934,9 +934,8 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val,
dst = (AVDictionary **)(((uint8_t *)target_obj) + o->offset);
av_dict_free(dst);
- av_dict_copy(dst, val, 0);
- return 0;
+ return av_dict_copy(dst, val, 0);
}
int av_opt_set_chlayout(void *obj, const char *name,
@@ -1348,9 +1347,8 @@ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDiction
return AVERROR(EINVAL);
src = *(AVDictionary **)(((uint8_t *)target_obj) + o->offset);
- av_dict_copy(out_val, src, 0);
- return 0;
+ return av_dict_copy(out_val, src, 0);
}
int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
More information about the ffmpeg-cvslog
mailing list