libswscale/output.c:1284: error: Null Dereference
  pointer `desc` last assigned on line 1282 could be null and is dereferenced at line 1284, column 21.

libswscale/output.c:1274:1: start of procedure yuv2gbrp_full_X_c()
1272. YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full,  AV_PIX_FMT_RGB24, 0)
1273. 
1274. static void
      ^
1275. yuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,
1276.                   const int16_t **lumSrc, int lumFilterSize,

libswscale/output.c:1282:5: 
1280.                   int dstW, int y)
1281. {
1282.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
          ^
1283.     int i;
1284.     int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;

libavutil/pixdesc.c:1894:1: start of procedure av_pix_fmt_desc_get()
  1892. }
  1893. 
  1894. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1895. {
  1896.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1896:9: Taking false branch
  1894. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1895. {
  1896.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1897.         return NULL;
  1898.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1896:24: Taking true branch
  1894. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1895. {
  1896.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1897.         return NULL;
  1898.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1897:9: 
  1895. {
  1896.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1897.         return NULL;
                ^
  1898.     return &av_pix_fmt_descriptors[pix_fmt];
  1899. }

libavutil/pixdesc.c:1899:1: return from a call to av_pix_fmt_desc_get
  1897.         return NULL;
  1898.     return &av_pix_fmt_descriptors[pix_fmt];
  1899. }
        ^
  1900. 
  1901. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/output.c:1284:21: 
1282.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
1283.     int i;
1284.     int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;
                          ^
1285.     uint16_t **dest16 = (uint16_t**)dest;
1286.     int SH = 22 + 8 - desc->comp[0].depth;

static void
yuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,
                  const int16_t **lumSrc, int lumFilterSize,
                  const int16_t *chrFilter, const int16_t **chrUSrc,
                  const int16_t **chrVSrc, int chrFilterSize,
                  const int16_t **alpSrc, uint8_t **dest,
                  int dstW, int y)
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
    int i;
    int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;
    uint16_t **dest16 = (uint16_t**)dest;
    int SH = 22 + 8 - desc->comp[0].depth;
    for (i = 0; i < dstW; i++) {
        int j;
        int Y = 1 << 9;
        int U = (1 << 9) - (128 << 19);
        int V = (1 << 9) - (128 << 19);
        int R, G, B, A;
        for (j = 0; j < lumFilterSize; j++)
            Y += lumSrc[j][i] * lumFilter[j];
        for (j = 0; j < chrFilterSize; j++) {
            U += chrUSrc[j][i] * chrFilter[j];
            V += chrVSrc[j][i] * chrFilter[j];
        }
        Y >>= 10;
        U >>= 10;
        V >>= 10;
        if (hasAlpha) {
            A = 1 << 18;
            for (j = 0; j < lumFilterSize; j++)
                A += alpSrc[j][i] * lumFilter[j];
            A >>= 19;
            if (A & 0x100)
                A = av_clip_uint8(A);
        }
        Y -= c->yuv2rgb_y_offset;
        Y *= c->yuv2rgb_y_coeff;
        Y += 1 << 21;
        R = Y + V * c->yuv2rgb_v2r_coeff;
        G = Y + V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
        B = Y +                            U * c->yuv2rgb_u2b_coeff;
        if ((R | G | B) & 0xC0000000) {
            R = av_clip_uintp2(R, 30);
            G = av_clip_uintp2(G, 30);
            B = av_clip_uintp2(B, 30);
        }
        if (SH != 22) {
            dest16[0][i] = G >> SH;
            dest16[1][i] = B >> SH;
            dest16[2][i] = R >> SH;
            if (hasAlpha)
                dest16[3][i] = A;
        } else {
            dest[0][i] = G >> 22;
            dest[1][i] = B >> 22;
            dest[2][i] = R >> 22;
            if (hasAlpha)
                dest[3][i] = A;
        }
    }
    if (SH != 22 && (!isBE(c->dstFormat)) != (!HAVE_BIGENDIAN)) {
        for (i = 0; i < dstW; i++) {
            dest16[0][i] = av_bswap16(dest16[0][i]);
            dest16[1][i] = av_bswap16(dest16[1][i]);
            dest16[2][i] = av_bswap16(dest16[2][i]);
            if (hasAlpha)
                dest16[3][i] = av_bswap16(dest16[3][i]);
        }
    }
}
['static void\nyuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,\n                  const int16_t **lumSrc, int lumFilterSize,\n                  const int16_t *chrFilter, const int16_t **chrUSrc,\n                  const int16_t **chrVSrc, int chrFilterSize,\n                  const int16_t **alpSrc, uint8_t **dest,\n                  int dstW, int y)\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);\n    int i;\n    int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;\n    uint16_t **dest16 = (uint16_t**)dest;\n    int SH = 22 + 8 - desc->comp[0].depth;\n    for (i = 0; i < dstW; i++) {\n        int j;\n        int Y = 1 << 9;\n        int U = (1 << 9) - (128 << 19);\n        int V = (1 << 9) - (128 << 19);\n        int R, G, B, A;\n        for (j = 0; j < lumFilterSize; j++)\n            Y += lumSrc[j][i] * lumFilter[j];\n        for (j = 0; j < chrFilterSize; j++) {\n            U += chrUSrc[j][i] * chrFilter[j];\n            V += chrVSrc[j][i] * chrFilter[j];\n        }\n        Y >>= 10;\n        U >>= 10;\n        V >>= 10;\n        if (hasAlpha) {\n            A = 1 << 18;\n            for (j = 0; j < lumFilterSize; j++)\n                A += alpSrc[j][i] * lumFilter[j];\n            A >>= 19;\n            if (A & 0x100)\n                A = av_clip_uint8(A);\n        }\n        Y -= c->yuv2rgb_y_offset;\n        Y *= c->yuv2rgb_y_coeff;\n        Y += 1 << 21;\n        R = Y + V * c->yuv2rgb_v2r_coeff;\n        G = Y + V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;\n        B = Y +                            U * c->yuv2rgb_u2b_coeff;\n        if ((R | G | B) & 0xC0000000) {\n            R = av_clip_uintp2(R, 30);\n            G = av_clip_uintp2(G, 30);\n            B = av_clip_uintp2(B, 30);\n        }\n        if (SH != 22) {\n            dest16[0][i] = G >> SH;\n            dest16[1][i] = B >> SH;\n            dest16[2][i] = R >> SH;\n            if (hasAlpha)\n                dest16[3][i] = A;\n        } else {\n            dest[0][i] = G >> 22;\n            dest[1][i] = B >> 22;\n            dest[2][i] = R >> 22;\n            if (hasAlpha)\n                dest[3][i] = A;\n        }\n    }\n    if (SH != 22 && (!isBE(c->dstFormat)) != (!HAVE_BIGENDIAN)) {\n        for (i = 0; i < dstW; i++) {\n            dest16[0][i] = av_bswap16(dest16[0][i]);\n            dest16[1][i] = av_bswap16(dest16[1][i]);\n            dest16[2][i] = av_bswap16(dest16[2][i]);\n            if (hasAlpha)\n                dest16[3][i] = av_bswap16(dest16[3][i]);\n        }\n    }\n}', 'const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)\n{\n    if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)\n        return NULL;\n    return &av_pix_fmt_descriptors[pix_fmt];\n}']