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

libavcodec/mpegvideo_enc.c:1429:1: start of procedure frame_end()
1427. }
1428. 
1429. static void frame_end(MpegEncContext *s)
      ^
1430. {
1431.     int i;

libavcodec/mpegvideo_enc.c:1433:9: Taking true branch
1431.     int i;
1432. 
1433.     if (s->unrestricted_mv &&
              ^
1434.         s->current_picture.reference &&
1435.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1434:9: Taking true branch
1432. 
1433.     if (s->unrestricted_mv &&
1434.         s->current_picture.reference &&
              ^
1435.         !s->intra_only) {
1436.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1435:10: Taking true branch
1433.     if (s->unrestricted_mv &&
1434.         s->current_picture.reference &&
1435.         !s->intra_only) {
               ^
1436.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1437.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1436:9: 
1434.         s->current_picture.reference &&
1435.         !s->intra_only) {
1436.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1437.         int hshift = desc->log2_chroma_w;
1438.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1682:1: start of procedure av_pix_fmt_desc_get()
  1680. }
  1681. 
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1684:9: Taking false branch
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1684:24: Taking true branch
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1685:9: 
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1685.         return NULL;
                ^
  1686.     return &av_pix_fmt_descriptors[pix_fmt];
  1687. }

libavutil/pixdesc.c:1687:1: return from a call to av_pix_fmt_desc_get
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];
  1687. }
        ^
  1688. 
  1689. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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