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

libavcodec/imgconvert.c:543:1: start of procedure avg_bits_per_pixel()
541. }
542. 
543. static int avg_bits_per_pixel(enum AVPixelFormat pix_fmt)
     ^
544. {
545.     int bits;

libavcodec/imgconvert.c:547:5: 
545.     int bits;
546.     const PixFmtInfo *pf;
547.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
         ^
548. 
549.     pf = &pix_fmt_info[pix_fmt];

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)

libavcodec/imgconvert.c:549:5: 
547.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
548. 
549.     pf = &pix_fmt_info[pix_fmt];
         ^
550.     switch(pf->pixel_type) {
551.     case FF_PIXEL_PACKED:

libavcodec/imgconvert.c:550:5: 
548. 
549.     pf = &pix_fmt_info[pix_fmt];
550.     switch(pf->pixel_type) {
         ^
551.     case FF_PIXEL_PACKED:
552.         switch(pix_fmt) {

libavcodec/imgconvert.c:551:5: Switch condition is false. Skipping switch case
549.     pf = &pix_fmt_info[pix_fmt];
550.     switch(pf->pixel_type) {
551.     case FF_PIXEL_PACKED:
         ^
552.         switch(pix_fmt) {
553.         case AV_PIX_FMT_YUYV422:

libavcodec/imgconvert.c:577:5: Switch condition is true. Entering switch case
575.         }
576.         break;
577.     case FF_PIXEL_PLANAR:
         ^
578.         if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
579.             bits = pf->depth * pf->nb_channels;

libavcodec/imgconvert.c:578:13: 
576.         break;
577.     case FF_PIXEL_PLANAR:
578.         if (desc->log2_chroma_w == 0 && desc->log2_chroma_h == 0) {
                 ^
579.             bits = pf->depth * pf->nb_channels;
580.         } else {
