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

libavcodec/mpegvideo_enc.c:1420:1: start of procedure frame_end()
1418. }
1419. 
1420. static void frame_end(MpegEncContext *s)
      ^
1421. {
1422.     int i;

libavcodec/mpegvideo_enc.c:1424:9: Taking true branch
1422.     int i;
1423. 
1424.     if (s->unrestricted_mv &&
              ^
1425.         s->current_picture.reference &&
1426.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1425:9: Taking true branch
1423. 
1424.     if (s->unrestricted_mv &&
1425.         s->current_picture.reference &&
              ^
1426.         !s->intra_only) {
1427.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1426:10: Taking true branch
1424.     if (s->unrestricted_mv &&
1425.         s->current_picture.reference &&
1426.         !s->intra_only) {
               ^
1427.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1428.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1427:9: 
1425.         s->current_picture.reference &&
1426.         !s->intra_only) {
1427.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1428.         int hshift = desc->log2_chroma_w;
1429.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1676:1: start of procedure av_pix_fmt_desc_get()
  1674. }
  1675. 
  1676. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1677. {
  1678.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1678:9: Taking false branch
  1676. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1677. {
  1678.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1679.         return NULL;
  1680.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1678:24: Taking true branch
  1676. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1677. {
  1678.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1679.         return NULL;
  1680.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1679:9: 
  1677. {
  1678.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1679.         return NULL;
                ^
  1680.     return &av_pix_fmt_descriptors[pix_fmt];
  1681. }

libavutil/pixdesc.c:1681:1: return from a call to av_pix_fmt_desc_get
  1679.         return NULL;
  1680.     return &av_pix_fmt_descriptors[pix_fmt];
  1681. }
        ^
  1682. 
  1683. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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