libavcodec/lagarith.c:524: error: Uninitialized Value
  The value read from srcs[_] was never initialized.

libavcodec/lagarith.c:524:17: 
522.             dst += p->linesize[0];
523.             for (i = 0; i < 4; i++)
524.                 srcs[i] += l->rgb_stride;
                     ^
525.         }
526.         break;

static int lag_decode_frame(AVCodecContext *avctx,
                            void *data, int *data_size, AVPacket *avpkt)
{
    const uint8_t *buf = avpkt->data;
    int buf_size = avpkt->size;
    LagarithContext *l = avctx->priv_data;
    AVFrame *const p = &l->picture;
    uint8_t frametype = 0;
    uint32_t offset_gu = 0, offset_bv = 0, offset_ry = 9;
    int offs[4];
    uint8_t *srcs[4], *dst;
    int i, j;
    AVFrame *picture = data;
    if (p->data[0])
        avctx->release_buffer(avctx, p);
    p->reference = 0;
    p->key_frame = 1;
    frametype = buf[0];
    offset_gu = AV_RL32(buf + 1);
    offset_bv = AV_RL32(buf + 5);
    switch (frametype) {
    case FRAME_SOLID_RGBA:
        avctx->pix_fmt = PIX_FMT_RGB32;
        if (avctx->get_buffer(avctx, p) < 0) {
            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
            return -1;
        }
        dst = p->data[0];
        for (j = 0; j < avctx->height; j++) {
            for (i = 0; i < avctx->width; i++)
                AV_WN32(dst + i * 4, offset_gu);
            dst += p->linesize[0];
        }
        break;
    case FRAME_ARITH_RGBA:
        avctx->pix_fmt = PIX_FMT_RGB32;
        if (avctx->get_buffer(avctx, p) < 0) {
            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
            return -1;
        }
        offs[0] = offset_bv;
        offs[1] = offset_gu;
        offs[2] = 13;
        offs[3] = AV_RL32(buf + 9);
        if (!l->rgb_planes) {
            l->rgb_stride = FFALIGN(avctx->width, 16);
            l->rgb_planes = av_malloc(l->rgb_stride * avctx->height * 4);
            if (!l->rgb_planes) {
                av_log(avctx, AV_LOG_ERROR, "cannot allocate temporary buffer\n");
                return AVERROR(ENOMEM);
            }
        }
        for (i = 0; i < 4; i++)
            srcs[i] = l->rgb_planes + (i + 1) * l->rgb_stride * avctx->height - l->rgb_stride;
        for (i = 0; i < 4; i++)
            lag_decode_arith_plane(l, srcs[i],
                                   avctx->width, avctx->height,
                                   -l->rgb_stride, buf + offs[i],
                                   buf_size);
        dst = p->data[0];
        for (i = 0; i < 4; i++)
            srcs[i] = l->rgb_planes + i * l->rgb_stride * avctx->height;
        for (j = 0; j < avctx->height; j++) {
            for (i = 0; i < avctx->width; i++) {
                uint8_t r, g, b, a;
                r = srcs[0][i];
                g = srcs[1][i];
                b = srcs[2][i];
                a = srcs[3][i];
                r += g;
                b += g;
                AV_WN32(dst + i * 4, MKBETAG(a, r, g, b));
            }
            dst += p->linesize[0];
            for (i = 0; i < 4; i++)
                srcs[i] += l->rgb_stride;
        }
        break;
    case FRAME_ARITH_YV12:
        avctx->pix_fmt = PIX_FMT_YUV420P;
        if (avctx->get_buffer(avctx, p) < 0) {
            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
            return -1;
        }
        lag_decode_arith_plane(l, p->data[0], avctx->width, avctx->height,
                               p->linesize[0], buf + offset_ry,
                               buf_size);
        lag_decode_arith_plane(l, p->data[2], avctx->width / 2,
                               avctx->height / 2, p->linesize[2],
                               buf + offset_gu, buf_size);
        lag_decode_arith_plane(l, p->data[1], avctx->width / 2,
                               avctx->height / 2, p->linesize[1],
                               buf + offset_bv, buf_size);
        break;
    default:
        av_log(avctx, AV_LOG_ERROR,
               "Unsupported Lagarith frame type: %#x\n", frametype);
        return -1;
    }
    *picture = *p;
    *data_size = sizeof(AVFrame);
    return buf_size;
}
['static int lag_decode_frame(AVCodecContext *avctx,\n                            void *data, int *data_size, AVPacket *avpkt)\n{\n    const uint8_t *buf = avpkt->data;\n    int buf_size = avpkt->size;\n    LagarithContext *l = avctx->priv_data;\n    AVFrame *const p = &l->picture;\n    uint8_t frametype = 0;\n    uint32_t offset_gu = 0, offset_bv = 0, offset_ry = 9;\n    int offs[4];\n    uint8_t *srcs[4], *dst;\n    int i, j;\n    AVFrame *picture = data;\n    if (p->data[0])\n        avctx->release_buffer(avctx, p);\n    p->reference = 0;\n    p->key_frame = 1;\n    frametype = buf[0];\n    offset_gu = AV_RL32(buf + 1);\n    offset_bv = AV_RL32(buf + 5);\n    switch (frametype) {\n    case FRAME_SOLID_RGBA:\n        avctx->pix_fmt = PIX_FMT_RGB32;\n        if (avctx->get_buffer(avctx, p) < 0) {\n            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\\n");\n            return -1;\n        }\n        dst = p->data[0];\n        for (j = 0; j < avctx->height; j++) {\n            for (i = 0; i < avctx->width; i++)\n                AV_WN32(dst + i * 4, offset_gu);\n            dst += p->linesize[0];\n        }\n        break;\n    case FRAME_ARITH_RGBA:\n        avctx->pix_fmt = PIX_FMT_RGB32;\n        if (avctx->get_buffer(avctx, p) < 0) {\n            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\\n");\n            return -1;\n        }\n        offs[0] = offset_bv;\n        offs[1] = offset_gu;\n        offs[2] = 13;\n        offs[3] = AV_RL32(buf + 9);\n        if (!l->rgb_planes) {\n            l->rgb_stride = FFALIGN(avctx->width, 16);\n            l->rgb_planes = av_malloc(l->rgb_stride * avctx->height * 4);\n            if (!l->rgb_planes) {\n                av_log(avctx, AV_LOG_ERROR, "cannot allocate temporary buffer\\n");\n                return AVERROR(ENOMEM);\n            }\n        }\n        for (i = 0; i < 4; i++)\n            srcs[i] = l->rgb_planes + (i + 1) * l->rgb_stride * avctx->height - l->rgb_stride;\n        for (i = 0; i < 4; i++)\n            lag_decode_arith_plane(l, srcs[i],\n                                   avctx->width, avctx->height,\n                                   -l->rgb_stride, buf + offs[i],\n                                   buf_size);\n        dst = p->data[0];\n        for (i = 0; i < 4; i++)\n            srcs[i] = l->rgb_planes + i * l->rgb_stride * avctx->height;\n        for (j = 0; j < avctx->height; j++) {\n            for (i = 0; i < avctx->width; i++) {\n                uint8_t r, g, b, a;\n                r = srcs[0][i];\n                g = srcs[1][i];\n                b = srcs[2][i];\n                a = srcs[3][i];\n                r += g;\n                b += g;\n                AV_WN32(dst + i * 4, MKBETAG(a, r, g, b));\n            }\n            dst += p->linesize[0];\n            for (i = 0; i < 4; i++)\n                srcs[i] += l->rgb_stride;\n        }\n        break;\n    case FRAME_ARITH_YV12:\n        avctx->pix_fmt = PIX_FMT_YUV420P;\n        if (avctx->get_buffer(avctx, p) < 0) {\n            av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\\n");\n            return -1;\n        }\n        lag_decode_arith_plane(l, p->data[0], avctx->width, avctx->height,\n                               p->linesize[0], buf + offset_ry,\n                               buf_size);\n        lag_decode_arith_plane(l, p->data[2], avctx->width / 2,\n                               avctx->height / 2, p->linesize[2],\n                               buf + offset_gu, buf_size);\n        lag_decode_arith_plane(l, p->data[1], avctx->width / 2,\n                               avctx->height / 2, p->linesize[1],\n                               buf + offset_bv, buf_size);\n        break;\n    default:\n        av_log(avctx, AV_LOG_ERROR,\n               "Unsupported Lagarith frame type: %#x\\n", frametype);\n        return -1;\n    }\n    *picture = *p;\n    *data_size = sizeof(AVFrame);\n    return buf_size;\n}']