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

libavcodec/mpegvideo_enc.c:1552:1: start of procedure frame_end()
1550. }
1551. 
1552. static void frame_end(MpegEncContext *s)
      ^
1553. {
1554.     int i;

libavcodec/mpegvideo_enc.c:1556:9: Taking true branch
1554.     int i;
1555. 
1556.     if (s->unrestricted_mv &&
              ^
1557.         s->current_picture.reference &&
1558.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1557:9: Taking true branch
1555. 
1556.     if (s->unrestricted_mv &&
1557.         s->current_picture.reference &&
              ^
1558.         !s->intra_only) {
1559.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1558:10: Taking true branch
1556.     if (s->unrestricted_mv &&
1557.         s->current_picture.reference &&
1558.         !s->intra_only) {
               ^
1559.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1560.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1559:9: 
1557.         s->current_picture.reference &&
1558.         !s->intra_only) {
1559.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1560.         int hshift = desc->log2_chroma_w;
1561.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1914:1: start of procedure av_pix_fmt_desc_get()
  1912. }
  1913. 
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1916:9: Taking false branch
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1916:24: Taking true branch
  1914. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1917:9: 
  1915. {
  1916.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1917.         return NULL;
                ^
  1918.     return &av_pix_fmt_descriptors[pix_fmt];
  1919. }

libavutil/pixdesc.c:1919:1: return from a call to av_pix_fmt_desc_get
  1917.         return NULL;
  1918.     return &av_pix_fmt_descriptors[pix_fmt];
  1919. }
        ^
  1920. 
  1921. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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