]> git.sesse.net Git - ffmpeg/commitdiff
lavc/decode: Initialize return value for get_format() failure.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Thu, 6 Dec 2018 22:17:13 +0000 (23:17 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 10 Dec 2018 00:50:04 +0000 (01:50 +0100)
Silences a warning:
libavcodec/decode.c:1378:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true

libavcodec/decode.c

index c89c77c43a98d6a5a12714cab591e9561ae52a57..a32ff2fcd395c877e62eec10c3b8107d6102cc85 100644 (file)
@@ -1378,6 +1378,7 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
         if (i == n) {
             av_log(avctx, AV_LOG_ERROR, "Invalid return from get_format(): "
                    "%s not in possible list.\n", desc->name);
+            ret = AV_PIX_FMT_NONE;
             break;
         }