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

libswscale/output.c:1264:1: start of procedure yuv2gbrp_full_X_c()
1262. YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full,  AV_PIX_FMT_RGB24, 0)
1263. 
1264. static void
      ^
1265. yuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,
1266.                   const int16_t **lumSrc, int lumFilterSize,

libswscale/output.c:1272:5: 
1270.                   int dstW, int y)
1271. {
1272.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
          ^
1273.     int i;
1274.     int hasAlpha = 0;

libavutil/pixdesc.c:1440:1: start of procedure av_pix_fmt_desc_get()
  1438. }
  1439. 
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1442:9: Taking false branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1442:24: Taking true branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1443:9: 
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1443.         return NULL;
                ^
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }

libavutil/pixdesc.c:1445:1: return from a call to av_pix_fmt_desc_get
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }
        ^
  1446. 
  1447. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/output.c:1274:5: 
1272.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
1273.     int i;
1274.     int hasAlpha = 0;
          ^
1275.     uint16_t **dest16 = (uint16_t**)dest;
1276.     int SH = 22 + 7 - desc->comp[0].depth_minus1;

libswscale/output.c:1275:5: 
1273.     int i;
1274.     int hasAlpha = 0;
1275.     uint16_t **dest16 = (uint16_t**)dest;
          ^
1276.     int SH = 22 + 7 - desc->comp[0].depth_minus1;
1277. 

libswscale/output.c:1276:5: 
1274.     int hasAlpha = 0;
1275.     uint16_t **dest16 = (uint16_t**)dest;
1276.     int SH = 22 + 7 - desc->comp[0].depth_minus1;
          ^
1277. 
1278.     for (i = 0; i < dstW; i++) {

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 = 0;
    uint16_t **dest16 = (uint16_t**)dest;
    int SH = 22 + 7 - desc->comp[0].depth_minus1;
    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;
        } else {
            dest[0][i] = G >> 22;
            dest[1][i] = B >> 22;
            dest[2][i] = R >> 22;
        }
    }
    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]);
        }
    }
}
['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 = 0;\n    uint16_t **dest16 = (uint16_t**)dest;\n    int SH = 22 + 7 - desc->comp[0].depth_minus1;\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        } else {\n            dest[0][i] = G >> 22;\n            dest[1][i] = B >> 22;\n            dest[2][i] = R >> 22;\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        }\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}']