libavcodec/mpegvideo_enc.c:1585: error: Null Dereference
  pointer `desc` last assigned on line 1584 could be null and is dereferenced at line 1585, column 22.

libavcodec/mpegvideo_enc.c:1577:1: start of procedure frame_end()
1575. }
1576. 
1577. static void frame_end(MpegEncContext *s)
      ^
1578. {
1579.     int i;

libavcodec/mpegvideo_enc.c:1581:9: Taking true branch
1579.     int i;
1580. 
1581.     if (s->unrestricted_mv &&
              ^
1582.         s->current_picture.reference &&
1583.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1582:9: Taking true branch
1580. 
1581.     if (s->unrestricted_mv &&
1582.         s->current_picture.reference &&
              ^
1583.         !s->intra_only) {
1584.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1583:10: Taking true branch
1581.     if (s->unrestricted_mv &&
1582.         s->current_picture.reference &&
1583.         !s->intra_only) {
               ^
1584.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1585.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1584:9: 
1582.         s->current_picture.reference &&
1583.         !s->intra_only) {
1584.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1585.         int hshift = desc->log2_chroma_w;
1586.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1840:1: start of procedure av_pix_fmt_desc_get()
  1838. }
  1839. 
  1840. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1841. {
  1842.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1842:9: Taking false branch
  1840. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1841. {
  1842.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1843.         return NULL;
  1844.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1842:24: Taking true branch
  1840. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1841. {
  1842.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1843.         return NULL;
  1844.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1843:9: 
  1841. {
  1842.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1843.         return NULL;
                ^
  1844.     return &av_pix_fmt_descriptors[pix_fmt];
  1845. }

libavutil/pixdesc.c:1845:1: return from a call to av_pix_fmt_desc_get
  1843.         return NULL;
  1844.     return &av_pix_fmt_descriptors[pix_fmt];
  1845. }
        ^
  1846. 
  1847. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/mpegvideo_enc.c:1585:9: 
1583.         !s->intra_only) {
1584.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1585.         int hshift = desc->log2_chroma_w;
              ^
1586.         int vshift = desc->log2_chroma_h;
1587.         s->mpvencdsp.draw_edges(s->current_picture.f->data[0], s->linesize,
