[FFmpeg-cvslog] decode: Initialize ret before using it

Vittorio Giovara git at videolan.org
Mon Apr 24 01:29:41 EEST 2017


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Apr  3 21:58:15 2017 +0200| [960b4d47612ec89cfdf0ff8b83bc7424ad4c754a] | committer: James Almer

decode: Initialize ret before using it

libavcodec/decode.c:608:9: warning: variable 'ret' is
      used uninitialized whenever 'if' condition is false

(cherry picked from libav commit efddf2c09aed7400c73ecf327f86a4d0452b94b5)

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

 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index debbe36e0f..6ff3c401ba 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -695,7 +695,7 @@ static int compat_decode(AVCodecContext *avctx, AVFrame *frame,
                          int *got_frame, const AVPacket *pkt)
 {
     AVCodecInternal *avci = avctx->internal;
-    int ret;
+    int ret = 0;
 
     av_assert0(avci->compat_decode_consumed == 0);
 



More information about the ffmpeg-cvslog mailing list