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

libswscale/utils.c:783:1: start of procedure getSubSampleFactors()
781. #endif /* HAVE_MMXEXT_INLINE */
782. 
783. static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)
     ^
784. {
785.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);

libswscale/utils.c:785:5: 
783. static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format)
784. {
785.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
         ^
786.     *h = desc->log2_chroma_w;
787.     *v = desc->log2_chroma_h;

libavutil/pixdesc.c:1570:1: start of procedure av_pix_fmt_desc_get()
  1568. }
  1569. 
  1570. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1571. {
  1572.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1572:9: Taking false branch
  1570. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1571. {
  1572.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1573.         return NULL;
  1574.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1572:24: Taking true branch
  1570. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1571. {
  1572.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1573.         return NULL;
  1574.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1573:9: 
  1571. {
  1572.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1573.         return NULL;
                ^
  1574.     return &av_pix_fmt_descriptors[pix_fmt];
  1575. }

libavutil/pixdesc.c:1575:1: return from a call to av_pix_fmt_desc_get
  1573.         return NULL;
  1574.     return &av_pix_fmt_descriptors[pix_fmt];
  1575. }
        ^
  1576. 
  1577. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libswscale/utils.c:786:5: 
784. {
785.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
786.     *h = desc->log2_chroma_w;
         ^
787.     *v = desc->log2_chroma_h;
788. }

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}']