[FFmpeg-cvslog] avutil/opt: initialize ret

Michael Niedermayer git at videolan.org
Thu Jan 16 02:46:54 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 20 18:38:48 2013 +0200| [803ca5c3491a295a52cc7f2b1b583468d21a953f] | committer: Michael Niedermayer

avutil/opt: initialize ret

Fixes CID1108610
Fixes use of uninitialized variable

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2d8ccf0adcae09cb9e14b01cfe20e4d77c3bbf5d)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavutil/opt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index f91d18b..eeb72fd 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -249,7 +249,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
 
 int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
 {
-    int ret;
+    int ret = 0;
     void *dst, *target_obj;
     const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj);
     if (!o || !target_obj)



More information about the ffmpeg-cvslog mailing list