libavcodec/utils.c:980: error: Uninitialized Value
  The value read from ret was never initialized.

libavcodec/utils.c:980:5: 
978. 
979.     av_freep(&choices);
980.     return ret;
         ^
981. }
982. 

int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
{
    const AVPixFmtDescriptor *desc;
    enum AVPixelFormat *choices;
    enum AVPixelFormat ret;
    unsigned n = 0;
    while (fmt[n] != AV_PIX_FMT_NONE)
        ++n;
    choices = av_malloc_array(n + 1, sizeof(*choices));
    if (!choices)
        return AV_PIX_FMT_NONE;
    memcpy(choices, fmt, (n + 1) * sizeof(*choices));
    for (;;) {
        ret = avctx->get_format(avctx, choices);
        desc = av_pix_fmt_desc_get(ret);
        if (!desc) {
            ret = AV_PIX_FMT_NONE;
            break;
        }
        if (avctx->hwaccel && avctx->hwaccel->uninit)
            avctx->hwaccel->uninit(avctx);
        av_freep(&avctx->internal->hwaccel_priv_data);
        avctx->hwaccel = NULL;
        if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
            break;
        if (!setup_hwaccel(avctx, ret, desc->name))
            break;
        for (n = 0; choices[n] != ret; n++)
            av_assert0(choices[n] != AV_PIX_FMT_NONE);
        do
            choices[n] = choices[n + 1];
        while (choices[n] != AV_PIX_FMT_NONE);
    }
    av_freep(&choices);
    return ret;
}
['int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)\n{\n    const AVPixFmtDescriptor *desc;\n    enum AVPixelFormat *choices;\n    enum AVPixelFormat ret;\n    unsigned n = 0;\n    while (fmt[n] != AV_PIX_FMT_NONE)\n        ++n;\n    choices = av_malloc_array(n + 1, sizeof(*choices));\n    if (!choices)\n        return AV_PIX_FMT_NONE;\n    memcpy(choices, fmt, (n + 1) * sizeof(*choices));\n    for (;;) {\n        ret = avctx->get_format(avctx, choices);\n        desc = av_pix_fmt_desc_get(ret);\n        if (!desc) {\n            ret = AV_PIX_FMT_NONE;\n            break;\n        }\n        if (avctx->hwaccel && avctx->hwaccel->uninit)\n            avctx->hwaccel->uninit(avctx);\n        av_freep(&avctx->internal->hwaccel_priv_data);\n        avctx->hwaccel = NULL;\n        if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))\n            break;\n        if (!setup_hwaccel(avctx, ret, desc->name))\n            break;\n        for (n = 0; choices[n] != ret; n++)\n            av_assert0(choices[n] != AV_PIX_FMT_NONE);\n        do\n            choices[n] = choices[n + 1];\n        while (choices[n] != AV_PIX_FMT_NONE);\n    }\n    av_freep(&choices);\n    return ret;\n}']