libavcodec/imgconvert.c:572: error: Null Dereference
  pointer `desc` last assigned on line 541 could be null and is dereferenced at line 572, column 13.

libavcodec/imgconvert.c:537:1: start of procedure avg_bits_per_pixel()
535. }
536. 
537. static int avg_bits_per_pixel(enum AVPixelFormat pix_fmt)
     ^
538. {
539.     int bits;

libavcodec/imgconvert.c:541:5: 
539.     int bits;
540.     const PixFmtInfo *pf;
541.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
         ^
542. 
543.     pf = &pix_fmt_info[pix_fmt];

libavutil/pixdesc.c:1433:1: start of procedure av_pix_fmt_desc_get()
  1431. }
  1432. 
  1433. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1434. {
  1435.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1435:9: Taking false branch
  1433. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1434. {
  1435.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1436.         return NULL;
  1437.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1435:24: Taking true branch
  1433. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1434. {
  1435.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1436.         return NULL;
  1437.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1436:9: 
  1434. {
  1435.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1436.         return NULL;
                ^
  1437.     return &av_pix_fmt_descriptors[pix_fmt];
  1438. }

libavutil/pixdesc.c:1438:1: return from a call to av_pix_fmt_desc_get
  1436.         return NULL;
  1437.     return &av_pix_fmt_descriptors[pix_fmt];
  1438. }
        ^
  1439. 
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/imgconvert.c:543:5: 
541.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
542. 
543.     pf = &pix_fmt_info[pix_fmt];
         ^
544.     switch(pf->pixel_type) {
545.     case FF_PIXEL_PACKED:

libavcodec/imgconvert.c:544:5: 
542. 
543.     pf = &pix_fmt_info[pix_fmt];
544.     switch(pf->pixel_type) {
         ^
545.     case FF_PIXEL_PACKED:
546.         switch(pix_fmt) {

libavcodec/imgconvert.c:545:5: Switch condition is false. Skipping switch case
543.     pf = &pix_fmt_info[pix_fmt];
544.     switch(pf->pixel_type) {
545.     case FF_PIXEL_PACKED:
         ^
546.         switch(pix_fmt) {
547.         case AV_PIX_FMT_YUYV422:

libavcodec/imgconvert.c:571:5: Switch condition is true. Entering switch case
569.         }
570.         break;
571.     case FF_PIXEL_PLANAR:
         ^
572.         if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
573.             bits = pf->depth * pf->nb_channels;

libavcodec/imgconvert.c:572:13: 
570.         break;
571.     case FF_PIXEL_PLANAR:
572.         if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
                 ^
573.             bits = pf->depth * pf->nb_channels;
574.         } else {
