libswscale/swscale_unscaled.c:473: error: Null Dereference
  pointer `desc_src` last assigned on line 465 could be null and is dereferenced at line 473, column 9.

libswscale/swscale_unscaled.c:458:1: start of procedure findRgbConvFn()
456. /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */
457. typedef void (* rgbConvFn) (const uint8_t *, uint8_t *, int);
458. static rgbConvFn findRgbConvFn(SwsContext *c)
     ^
459. {
460.     const enum AVPixelFormat srcFormat = c->srcFormat;

libswscale/swscale_unscaled.c:460:5: 
458. static rgbConvFn findRgbConvFn(SwsContext *c)
459. {
460.     const enum AVPixelFormat srcFormat = c->srcFormat;
         ^
461.     const enum AVPixelFormat dstFormat = c->dstFormat;
462.     const int srcId = c->srcFormatBpp;

libswscale/swscale_unscaled.c:461:5: 
459. {
460.     const enum AVPixelFormat srcFormat = c->srcFormat;
461.     const enum AVPixelFormat dstFormat = c->dstFormat;
         ^
462.     const int srcId = c->srcFormatBpp;
463.     const int dstId = c->dstFormatBpp;

libswscale/swscale_unscaled.c:462:5: 
460.     const enum AVPixelFormat srcFormat = c->srcFormat;
461.     const enum AVPixelFormat dstFormat = c->dstFormat;
462.     const int srcId = c->srcFormatBpp;
         ^
463.     const int dstId = c->dstFormatBpp;
464.     rgbConvFn conv = NULL;

libswscale/swscale_unscaled.c:463:5: 
461.     const enum AVPixelFormat dstFormat = c->dstFormat;
462.     const int srcId = c->srcFormatBpp;
463.     const int dstId = c->dstFormatBpp;
         ^
464.     rgbConvFn conv = NULL;
465.     const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);

libswscale/swscale_unscaled.c:464:5: 
462.     const int srcId = c->srcFormatBpp;
463.     const int dstId = c->dstFormatBpp;
464.     rgbConvFn conv = NULL;
         ^
465.     const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);
466.     const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(dstFormat);

libswscale/swscale_unscaled.c:465:5: 
463.     const int dstId = c->dstFormatBpp;
464.     rgbConvFn conv = NULL;
465.     const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);
         ^
466.     const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(dstFormat);
467. 

libavutil/pixdesc.c:1199:1: start of procedure av_pix_fmt_desc_get()
  1197. }
  1198. 
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1201:9: Taking false branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1201:24: Taking true branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1202:9: 
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1202.         return NULL;
                ^
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }

libavutil/pixdesc.c:1204:1: return from a call to av_pix_fmt_desc_get
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }
        ^
  1205. 
  1206. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/swscale_unscaled.c:466:5: 
464.     rgbConvFn conv = NULL;
465.     const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);
466.     const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(dstFormat);
         ^
467. 
468. #define IS_NOT_NE(bpp, desc) \

libavutil/pixdesc.c:1199:1: start of procedure av_pix_fmt_desc_get()
  1197. }
  1198. 
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1201:9: Taking false branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1201:24: Taking true branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1202:9: 
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1202.         return NULL;
                ^
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }

libavutil/pixdesc.c:1204:1: return from a call to av_pix_fmt_desc_get
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }
        ^
  1205. 
  1206. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/swscale_unscaled.c:473:9: Taking true branch
471. 
472.     /* if this is non-native rgb444/555/565, don't handle it here. */
473.     if (IS_NOT_NE(srcId, desc_src) || IS_NOT_NE(dstId, desc_dst))
             ^
474.         return NULL;
475. 

static rgbConvFn findRgbConvFn(SwsContext *c)
{
    const enum AVPixelFormat srcFormat = c->srcFormat;
    const enum AVPixelFormat dstFormat = c->dstFormat;
    const int srcId = c->srcFormatBpp;
    const int dstId = c->dstFormatBpp;
    rgbConvFn conv = NULL;
    const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);
    const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(dstFormat);
#define IS_NOT_NE(bpp, desc) \
    (((bpp + 7) >> 3) == 2 && \
     (!(desc->flags & PIX_FMT_BE) != !HAVE_BIGENDIAN))
    if (IS_NOT_NE(srcId, desc_src) || IS_NOT_NE(dstId, desc_dst))
        return NULL;
#define CONV_IS(src, dst) (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)
    if (isRGBA32(srcFormat) && isRGBA32(dstFormat)) {
        if (     CONV_IS(ABGR, RGBA)
              || CONV_IS(ARGB, BGRA)
              || CONV_IS(BGRA, ARGB)
              || CONV_IS(RGBA, ABGR)) conv = shuffle_bytes_3210;
        else if (CONV_IS(ABGR, ARGB)
              || CONV_IS(ARGB, ABGR)) conv = shuffle_bytes_0321;
        else if (CONV_IS(ABGR, BGRA)
              || CONV_IS(ARGB, RGBA)) conv = shuffle_bytes_1230;
        else if (CONV_IS(BGRA, RGBA)
              || CONV_IS(RGBA, BGRA)) conv = shuffle_bytes_2103;
        else if (CONV_IS(BGRA, ABGR)
              || CONV_IS(RGBA, ARGB)) conv = shuffle_bytes_3012;
    } else
    if ((isBGRinInt(srcFormat) && isBGRinInt(dstFormat)) ||
        (isRGBinInt(srcFormat) && isRGBinInt(dstFormat))) {
        switch (srcId | (dstId << 16)) {
        case 0x000F000C: conv = rgb12to15; break;
        case 0x000F0010: conv = rgb16to15; break;
        case 0x000F0018: conv = rgb24to15; break;
        case 0x000F0020: conv = rgb32to15; break;
        case 0x0010000F: conv = rgb15to16; break;
        case 0x00100018: conv = rgb24to16; break;
        case 0x00100020: conv = rgb32to16; break;
        case 0x0018000F: conv = rgb15to24; break;
        case 0x00180010: conv = rgb16to24; break;
        case 0x00180020: conv = rgb32to24; break;
        case 0x0020000F: conv = rgb15to32; break;
        case 0x00200010: conv = rgb16to32; break;
        case 0x00200018: conv = rgb24to32; break;
        }
    } else if ((isBGRinInt(srcFormat) && isRGBinInt(dstFormat)) ||
               (isRGBinInt(srcFormat) && isBGRinInt(dstFormat))) {
        switch (srcId | (dstId << 16)) {
        case 0x000C000C: conv = rgb12tobgr12; break;
        case 0x000F000F: conv = rgb15tobgr15; break;
        case 0x000F0010: conv = rgb16tobgr15; break;
        case 0x000F0018: conv = rgb24tobgr15; break;
        case 0x000F0020: conv = rgb32tobgr15; break;
        case 0x0010000F: conv = rgb15tobgr16; break;
        case 0x00100010: conv = rgb16tobgr16; break;
        case 0x00100018: conv = rgb24tobgr16; break;
        case 0x00100020: conv = rgb32tobgr16; break;
        case 0x0018000F: conv = rgb15tobgr24; break;
        case 0x00180010: conv = rgb16tobgr24; break;
        case 0x00180018: conv = rgb24tobgr24; break;
        case 0x00180020: conv = rgb32tobgr24; break;
        case 0x0020000F: conv = rgb15tobgr32; break;
        case 0x00200010: conv = rgb16tobgr32; break;
        case 0x00200018: conv = rgb24tobgr32; break;
        }
    }
    return conv;
}
['static rgbConvFn findRgbConvFn(SwsContext *c)\n{\n    const enum AVPixelFormat srcFormat = c->srcFormat;\n    const enum AVPixelFormat dstFormat = c->dstFormat;\n    const int srcId = c->srcFormatBpp;\n    const int dstId = c->dstFormatBpp;\n    rgbConvFn conv = NULL;\n    const AVPixFmtDescriptor *desc_src = av_pix_fmt_desc_get(srcFormat);\n    const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(dstFormat);\n#define IS_NOT_NE(bpp, desc) \\\n    (((bpp + 7) >> 3) == 2 && \\\n     (!(desc->flags & PIX_FMT_BE) != !HAVE_BIGENDIAN))\n    if (IS_NOT_NE(srcId, desc_src) || IS_NOT_NE(dstId, desc_dst))\n        return NULL;\n#define CONV_IS(src, dst) (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)\n    if (isRGBA32(srcFormat) && isRGBA32(dstFormat)) {\n        if (     CONV_IS(ABGR, RGBA)\n              || CONV_IS(ARGB, BGRA)\n              || CONV_IS(BGRA, ARGB)\n              || CONV_IS(RGBA, ABGR)) conv = shuffle_bytes_3210;\n        else if (CONV_IS(ABGR, ARGB)\n              || CONV_IS(ARGB, ABGR)) conv = shuffle_bytes_0321;\n        else if (CONV_IS(ABGR, BGRA)\n              || CONV_IS(ARGB, RGBA)) conv = shuffle_bytes_1230;\n        else if (CONV_IS(BGRA, RGBA)\n              || CONV_IS(RGBA, BGRA)) conv = shuffle_bytes_2103;\n        else if (CONV_IS(BGRA, ABGR)\n              || CONV_IS(RGBA, ARGB)) conv = shuffle_bytes_3012;\n    } else\n    if ((isBGRinInt(srcFormat) && isBGRinInt(dstFormat)) ||\n        (isRGBinInt(srcFormat) && isRGBinInt(dstFormat))) {\n        switch (srcId | (dstId << 16)) {\n        case 0x000F000C: conv = rgb12to15; break;\n        case 0x000F0010: conv = rgb16to15; break;\n        case 0x000F0018: conv = rgb24to15; break;\n        case 0x000F0020: conv = rgb32to15; break;\n        case 0x0010000F: conv = rgb15to16; break;\n        case 0x00100018: conv = rgb24to16; break;\n        case 0x00100020: conv = rgb32to16; break;\n        case 0x0018000F: conv = rgb15to24; break;\n        case 0x00180010: conv = rgb16to24; break;\n        case 0x00180020: conv = rgb32to24; break;\n        case 0x0020000F: conv = rgb15to32; break;\n        case 0x00200010: conv = rgb16to32; break;\n        case 0x00200018: conv = rgb24to32; break;\n        }\n    } else if ((isBGRinInt(srcFormat) && isRGBinInt(dstFormat)) ||\n               (isRGBinInt(srcFormat) && isBGRinInt(dstFormat))) {\n        switch (srcId | (dstId << 16)) {\n        case 0x000C000C: conv = rgb12tobgr12; break;\n        case 0x000F000F: conv = rgb15tobgr15; break;\n        case 0x000F0010: conv = rgb16tobgr15; break;\n        case 0x000F0018: conv = rgb24tobgr15; break;\n        case 0x000F0020: conv = rgb32tobgr15; break;\n        case 0x0010000F: conv = rgb15tobgr16; break;\n        case 0x00100010: conv = rgb16tobgr16; break;\n        case 0x00100018: conv = rgb24tobgr16; break;\n        case 0x00100020: conv = rgb32tobgr16; break;\n        case 0x0018000F: conv = rgb15tobgr24; break;\n        case 0x00180010: conv = rgb16tobgr24; break;\n        case 0x00180018: conv = rgb24tobgr24; break;\n        case 0x00180020: conv = rgb32tobgr24; break;\n        case 0x0020000F: conv = rgb15tobgr32; break;\n        case 0x00200010: conv = rgb16tobgr32; break;\n        case 0x00200018: conv = rgb24tobgr32; break;\n        }\n    }\n    return conv;\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}']