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

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

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

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

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

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