libswscale/swscale_unscaled.c:1225: error: Null Dereference
  pointer `desc` last assigned on line 1225 could be null and is dereferenced at line 1225, column 5.

libswscale/swscale_unscaled.c:1211:1: start of procedure sws_scale()
1209.  * Assumes planar YUV to be in YUV order instead of YVU.
1210.  */
1211. int attribute_align_arg sws_scale(struct SwsContext *c,
      ^
1212.                                   const uint8_t * const srcSlice[],
1213.                                   const int srcStride[], int srcSliceY,

libswscale/swscale_unscaled.c:1218:5: 
1216. {
1217.     int i;
1218.     const uint8_t *src2[4] = { srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3] };
          ^
1219.     uint8_t *dst2[4] = { dst[0], dst[1], dst[2], dst[3] };
1220. 

libswscale/swscale_unscaled.c:1219:5: 
1217.     int i;
1218.     const uint8_t *src2[4] = { srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3] };
1219.     uint8_t *dst2[4] = { dst[0], dst[1], dst[2], dst[3] };
          ^
1220. 
1221.     // do not mess up sliceDir if we have a "trailing" 0-size slice

libswscale/swscale_unscaled.c:1222:9: Taking false branch
1220. 
1221.     // do not mess up sliceDir if we have a "trailing" 0-size slice
1222.     if (srcSliceH == 0)
              ^
1223.         return 0;
1224. 

libswscale/swscale_unscaled.c:1225:5: 
1223.         return 0;
1224. 
1225.     CHECK_IMAGE_POINTERS(srcSlice, c->srcFormat, srcStride, "bad src image pointers\n");
          ^
1226.     CHECK_IMAGE_POINTERS(dst, c->dstFormat, dstStride, "bad dst image pointers\n");
1227. 

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/swscale_unscaled.c:1225:5: Loop condition is true. Entering loop body
1223.         return 0;
1224. 
1225.     CHECK_IMAGE_POINTERS(srcSlice, c->srcFormat, srcStride, "bad src image pointers\n");
          ^
1226.     CHECK_IMAGE_POINTERS(dst, c->dstFormat, dstStride, "bad dst image pointers\n");
1227. 

int attribute_align_arg sws_scale(struct SwsContext *c,
                                  const uint8_t * const srcSlice[],
                                  const int srcStride[], int srcSliceY,
                                  int srcSliceH, uint8_t *const dst[],
                                  const int dstStride[])
{
    int i;
    const uint8_t *src2[4] = { srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3] };
    uint8_t *dst2[4] = { dst[0], dst[1], dst[2], dst[3] };
    if (srcSliceH == 0)
        return 0;
    CHECK_IMAGE_POINTERS(srcSlice, c->srcFormat, srcStride, "bad src image pointers\n");
    CHECK_IMAGE_POINTERS(dst, c->dstFormat, dstStride, "bad dst image pointers\n");
    if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {
        av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n");
        return 0;
    }
    if (c->sliceDir == 0) {
        if (srcSliceY == 0) c->sliceDir = 1; else c->sliceDir = -1;
    }
    if (usePal(c->srcFormat)) {
        for (i = 0; i < 256; i++) {
            int r, g, b, y, u, v;
            if (c->srcFormat == AV_PIX_FMT_PAL8) {
                uint32_t p = ((const uint32_t *)(srcSlice[1]))[i];
                r = (p >> 16) & 0xFF;
                g = (p >>  8) & 0xFF;
                b =  p        & 0xFF;
            } else if (c->srcFormat == AV_PIX_FMT_RGB8) {
                r = ( i >> 5     ) * 36;
                g = ((i >> 2) & 7) * 36;
                b = ( i       & 3) * 85;
            } else if (c->srcFormat == AV_PIX_FMT_BGR8) {
                b = ( i >> 6     ) * 85;
                g = ((i >> 3) & 7) * 36;
                r = ( i       & 7) * 36;
            } else if (c->srcFormat == AV_PIX_FMT_RGB4_BYTE) {
                r = ( i >> 3     ) * 255;
                g = ((i >> 1) & 3) * 85;
                b = ( i       & 1) * 255;
            } else if (c->srcFormat == AV_PIX_FMT_GRAY8 ||
                       c->srcFormat == AV_PIX_FMT_YA8) {
                r = g = b = i;
            } else {
                assert(c->srcFormat == AV_PIX_FMT_BGR4_BYTE);
                b = ( i >> 3     ) * 255;
                g = ((i >> 1) & 3) * 85;
                r = ( i       & 1) * 255;
            }
            y = av_clip_uint8((RY * r + GY * g + BY * b + ( 33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
            u = av_clip_uint8((RU * r + GU * g + BU * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
            v = av_clip_uint8((RV * r + GV * g + BV * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);
            c->pal_yuv[i] = y + (u << 8) + (v << 16) + (0xFFU << 24);
            switch (c->dstFormat) {
            case AV_PIX_FMT_BGR32:
#if !HAVE_BIGENDIAN
            case AV_PIX_FMT_RGB24:
#endif
                c->pal_rgb[i] =  r + (g << 8) + (b << 16) + (0xFFU << 24);
                break;
            case AV_PIX_FMT_BGR32_1:
#if HAVE_BIGENDIAN
            case AV_PIX_FMT_BGR24:
#endif
                c->pal_rgb[i] = 0xFF + (r << 8) + (g << 16) + ((unsigned)b << 24);
                break;
            case AV_PIX_FMT_RGB32_1:
#if HAVE_BIGENDIAN
            case AV_PIX_FMT_RGB24:
#endif
                c->pal_rgb[i] = 0xFF + (b << 8) + (g << 16) + ((unsigned)r << 24);
                break;
            case AV_PIX_FMT_RGB32:
#if !HAVE_BIGENDIAN
            case AV_PIX_FMT_BGR24:
#endif
            default:
                c->pal_rgb[i] =  b + (g << 8) + (r << 16) + (0xFFU << 24);
            }
        }
    }
    if (c->sliceDir == 1) {
        int srcStride2[4] = { srcStride[0], srcStride[1], srcStride[2],
                              srcStride[3] };
        int dstStride2[4] = { dstStride[0], dstStride[1], dstStride[2],
                              dstStride[3] };
        reset_ptr(src2, c->srcFormat);
        reset_ptr((const uint8_t **) dst2, c->dstFormat);
        if (srcSliceY + srcSliceH == c->srcH)
            c->sliceDir = 0;
        return c->swscale(c, src2, srcStride2, srcSliceY, srcSliceH, dst2,
                          dstStride2);
    } else {
        int srcStride2[4] = { -srcStride[0], -srcStride[1], -srcStride[2],
                              -srcStride[3] };
        int dstStride2[4] = { -dstStride[0], -dstStride[1], -dstStride[2],
                              -dstStride[3] };
        src2[0] += (srcSliceH - 1) * srcStride[0];
        if (!usePal(c->srcFormat))
            src2[1] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[1];
        src2[2] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[2];
        src2[3] += (srcSliceH - 1) * srcStride[3];
        dst2[0] += ( c->dstH                         - 1) * dstStride[0];
        dst2[1] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[1];
        dst2[2] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[2];
        dst2[3] += ( c->dstH                         - 1) * dstStride[3];
        reset_ptr(src2, c->srcFormat);
        reset_ptr((const uint8_t **) dst2, c->dstFormat);
        if (!srcSliceY)
            c->sliceDir = 0;
        return c->swscale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH,
                          srcSliceH, dst2, dstStride2);
    }
}
['int attribute_align_arg sws_scale(struct SwsContext *c,\n                                  const uint8_t * const srcSlice[],\n                                  const int srcStride[], int srcSliceY,\n                                  int srcSliceH, uint8_t *const dst[],\n                                  const int dstStride[])\n{\n    int i;\n    const uint8_t *src2[4] = { srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3] };\n    uint8_t *dst2[4] = { dst[0], dst[1], dst[2], dst[3] };\n    if (srcSliceH == 0)\n        return 0;\n    CHECK_IMAGE_POINTERS(srcSlice, c->srcFormat, srcStride, "bad src image pointers\\n");\n    CHECK_IMAGE_POINTERS(dst, c->dstFormat, dstStride, "bad dst image pointers\\n");\n    if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {\n        av_log(c, AV_LOG_ERROR, "Slices start in the middle!\\n");\n        return 0;\n    }\n    if (c->sliceDir == 0) {\n        if (srcSliceY == 0) c->sliceDir = 1; else c->sliceDir = -1;\n    }\n    if (usePal(c->srcFormat)) {\n        for (i = 0; i < 256; i++) {\n            int r, g, b, y, u, v;\n            if (c->srcFormat == AV_PIX_FMT_PAL8) {\n                uint32_t p = ((const uint32_t *)(srcSlice[1]))[i];\n                r = (p >> 16) & 0xFF;\n                g = (p >>  8) & 0xFF;\n                b =  p        & 0xFF;\n            } else if (c->srcFormat == AV_PIX_FMT_RGB8) {\n                r = ( i >> 5     ) * 36;\n                g = ((i >> 2) & 7) * 36;\n                b = ( i       & 3) * 85;\n            } else if (c->srcFormat == AV_PIX_FMT_BGR8) {\n                b = ( i >> 6     ) * 85;\n                g = ((i >> 3) & 7) * 36;\n                r = ( i       & 7) * 36;\n            } else if (c->srcFormat == AV_PIX_FMT_RGB4_BYTE) {\n                r = ( i >> 3     ) * 255;\n                g = ((i >> 1) & 3) * 85;\n                b = ( i       & 1) * 255;\n            } else if (c->srcFormat == AV_PIX_FMT_GRAY8 ||\n                       c->srcFormat == AV_PIX_FMT_YA8) {\n                r = g = b = i;\n            } else {\n                assert(c->srcFormat == AV_PIX_FMT_BGR4_BYTE);\n                b = ( i >> 3     ) * 255;\n                g = ((i >> 1) & 3) * 85;\n                r = ( i       & 1) * 255;\n            }\n            y = av_clip_uint8((RY * r + GY * g + BY * b + ( 33 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);\n            u = av_clip_uint8((RU * r + GU * g + BU * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);\n            v = av_clip_uint8((RV * r + GV * g + BV * b + (257 << (RGB2YUV_SHIFT - 1))) >> RGB2YUV_SHIFT);\n            c->pal_yuv[i] = y + (u << 8) + (v << 16) + (0xFFU << 24);\n            switch (c->dstFormat) {\n            case AV_PIX_FMT_BGR32:\n#if !HAVE_BIGENDIAN\n            case AV_PIX_FMT_RGB24:\n#endif\n                c->pal_rgb[i] =  r + (g << 8) + (b << 16) + (0xFFU << 24);\n                break;\n            case AV_PIX_FMT_BGR32_1:\n#if HAVE_BIGENDIAN\n            case AV_PIX_FMT_BGR24:\n#endif\n                c->pal_rgb[i] = 0xFF + (r << 8) + (g << 16) + ((unsigned)b << 24);\n                break;\n            case AV_PIX_FMT_RGB32_1:\n#if HAVE_BIGENDIAN\n            case AV_PIX_FMT_RGB24:\n#endif\n                c->pal_rgb[i] = 0xFF + (b << 8) + (g << 16) + ((unsigned)r << 24);\n                break;\n            case AV_PIX_FMT_RGB32:\n#if !HAVE_BIGENDIAN\n            case AV_PIX_FMT_BGR24:\n#endif\n            default:\n                c->pal_rgb[i] =  b + (g << 8) + (r << 16) + (0xFFU << 24);\n            }\n        }\n    }\n    if (c->sliceDir == 1) {\n        int srcStride2[4] = { srcStride[0], srcStride[1], srcStride[2],\n                              srcStride[3] };\n        int dstStride2[4] = { dstStride[0], dstStride[1], dstStride[2],\n                              dstStride[3] };\n        reset_ptr(src2, c->srcFormat);\n        reset_ptr((const uint8_t **) dst2, c->dstFormat);\n        if (srcSliceY + srcSliceH == c->srcH)\n            c->sliceDir = 0;\n        return c->swscale(c, src2, srcStride2, srcSliceY, srcSliceH, dst2,\n                          dstStride2);\n    } else {\n        int srcStride2[4] = { -srcStride[0], -srcStride[1], -srcStride[2],\n                              -srcStride[3] };\n        int dstStride2[4] = { -dstStride[0], -dstStride[1], -dstStride[2],\n                              -dstStride[3] };\n        src2[0] += (srcSliceH - 1) * srcStride[0];\n        if (!usePal(c->srcFormat))\n            src2[1] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[1];\n        src2[2] += ((srcSliceH >> c->chrSrcVSubSample) - 1) * srcStride[2];\n        src2[3] += (srcSliceH - 1) * srcStride[3];\n        dst2[0] += ( c->dstH                         - 1) * dstStride[0];\n        dst2[1] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[1];\n        dst2[2] += ((c->dstH >> c->chrDstVSubSample) - 1) * dstStride[2];\n        dst2[3] += ( c->dstH                         - 1) * dstStride[3];\n        reset_ptr(src2, c->srcFormat);\n        reset_ptr((const uint8_t **) dst2, c->dstFormat);\n        if (!srcSliceY)\n            c->sliceDir = 0;\n        return c->swscale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH,\n                          srcSliceH, dst2, dstStride2);\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}']