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

libavcodec/mpegvideo_enc.c:1393:1: start of procedure frame_end()
1391. }
1392. 
1393. static void frame_end(MpegEncContext *s)
      ^
1394. {
1395.     int i;

libavcodec/mpegvideo_enc.c:1397:9: Taking true branch
1395.     int i;
1396. 
1397.     if (s->unrestricted_mv &&
              ^
1398.         s->current_picture.reference &&
1399.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1398:9: Taking true branch
1396. 
1397.     if (s->unrestricted_mv &&
1398.         s->current_picture.reference &&
              ^
1399.         !s->intra_only) {
1400.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1399:10: Taking true branch
1397.     if (s->unrestricted_mv &&
1398.         s->current_picture.reference &&
1399.         !s->intra_only) {
               ^
1400.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1401.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1400:9: 
1398.         s->current_picture.reference &&
1399.         !s->intra_only) {
1400.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1401.         int hshift = desc->log2_chroma_w;
1402.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1599:1: start of procedure av_pix_fmt_desc_get()
  1597. }
  1598. 
  1599. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1600. {
  1601.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1601:9: Taking false branch
  1599. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1600. {
  1601.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1602.         return NULL;
  1603.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1601:24: Taking true branch
  1599. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1600. {
  1601.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1602.         return NULL;
  1603.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1602:9: 
  1600. {
  1601.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1602.         return NULL;
                ^
  1603.     return &av_pix_fmt_descriptors[pix_fmt];
  1604. }

libavutil/pixdesc.c:1604:1: return from a call to av_pix_fmt_desc_get
  1602.         return NULL;
  1603.     return &av_pix_fmt_descriptors[pix_fmt];
  1604. }
        ^
  1605. 
  1606. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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