decode: Initialize ret before using it
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 3 Apr 2017 19:58:15 +0000 (21:58 +0200)
committerJames Almer <jamrial@gmail.com>
Sun, 23 Apr 2017 22:29:12 +0000 (19:29 -0300)
libavcodec/decode.c:608:9: warning: variable 'ret' is
      used uninitialized whenever 'if' condition is false

(cherry picked from libav commit efddf2c09aed7400c73ecf327f86a4d0452b94b5)

libavcodec/decode.c

index debbe36..6ff3c40 100644 (file)
@@ -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);