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

libswscale/swscale_unscaled.c:996:1: start of procedure check_image_pointers()
994. }
995. 
996. static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,
     ^
997.                                 const int linesizes[4])
998. {

libswscale/swscale_unscaled.c:999:5: 
 997.                                 const int linesizes[4])
 998. {
 999.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
          ^
1000.     int i;
1001. 

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:1002:10: 
1000.     int i;
1001. 
1002.     for (i = 0; i < 4; i++) {
               ^
1003.         int plane = desc->comp[i].plane;
1004.         if (!data[plane] || !linesizes[plane])

libswscale/swscale_unscaled.c:1002:17: Loop condition is true. Entering loop body
1000.     int i;
1001. 
1002.     for (i = 0; i < 4; i++) {
                      ^
1003.         int plane = desc->comp[i].plane;
1004.         if (!data[plane] || !linesizes[plane])

libswscale/swscale_unscaled.c:1003:9: 
1001. 
1002.     for (i = 0; i < 4; i++) {
1003.         int plane = desc->comp[i].plane;
              ^
1004.         if (!data[plane] || !linesizes[plane])
1005.             return 0;

static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,
                                const int linesizes[4])
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
    int i;
    for (i = 0; i < 4; i++) {
        int plane = desc->comp[i].plane;
        if (!data[plane] || !linesizes[plane])
            return 0;
    }
    return 1;
}
['static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,\n                                const int linesizes[4])\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);\n    int i;\n    for (i = 0; i < 4; i++) {\n        int plane = desc->comp[i].plane;\n        if (!data[plane] || !linesizes[plane])\n            return 0;\n    }\n    return 1;\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}']