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 c89c77c..a32ff2f 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;
         }