libswscale/utils.c:798: error: Null Dereference
  pointer `desc` last assigned on line 797 could be null and is dereferenced at line 798, column 10.

libswscale/utils.c:795:1: start of procedure getSubSampleFactors()
793. #endif /* HAVE_MMXEXT_INLINE */
794. 
795. static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)
     ^
796. {
797.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);

libswscale/utils.c:797:5: 
795. static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)
796. {
797.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
         ^
798.     *h = desc->log2_chroma_w;
799.     *v = desc->log2_chroma_h;

libavutil/pixdesc.c:1914:1: start of procedure av_pix_fmt_desc_get()
  1912. }
  1913. 
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1916:9: Taking false branch
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1916:24: Taking true branch
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1917:9: 
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1917.         return NULL;
                ^
  1918.     return &av_pix_fmt_descriptors[pix_fmt];
  1919. }

libavutil/pixdesc.c:1919:1: return from a call to av_pix_fmt_desc_get
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];
  1919. }
        ^
  1920. 
  1921. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/utils.c:798:5: 
796. {
797.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
798.     *h = desc->log2_chroma_w;
         ^
799.     *v = desc->log2_chroma_h;
800. }

static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
    *h = desc->log2_chroma_w;
    *v = desc->log2_chroma_h;
}
['static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);\n    *h = desc->log2_chroma_w;\n    *v = desc->log2_chroma_h;\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}']