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

libavcodec/mpegvideo_enc.c:1409:1: start of procedure frame_end()
1407. }
1408. 
1409. static void frame_end(MpegEncContext *s)
      ^
1410. {
1411.     int i;

libavcodec/mpegvideo_enc.c:1413:9: Taking true branch
1411.     int i;
1412. 
1413.     if (s->unrestricted_mv &&
              ^
1414.         s->current_picture.reference &&
1415.         !s->intra_only) {

libavcodec/mpegvideo_enc.c:1414:9: Taking true branch
1412. 
1413.     if (s->unrestricted_mv &&
1414.         s->current_picture.reference &&
              ^
1415.         !s->intra_only) {
1416.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo_enc.c:1415:10: Taking true branch
1413.     if (s->unrestricted_mv &&
1414.         s->current_picture.reference &&
1415.         !s->intra_only) {
               ^
1416.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1417.         int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo_enc.c:1416:9: 
1414.         s->current_picture.reference &&
1415.         !s->intra_only) {
1416.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
1417.         int hshift = desc->log2_chroma_w;
1418.         int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1626:1: start of procedure av_pix_fmt_desc_get()
  1624. }
  1625. 
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1628:9: Taking false branch
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1628:24: Taking true branch
  1626. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1629:9: 
  1627. {
  1628.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1629.         return NULL;
                ^
  1630.     return &av_pix_fmt_descriptors[pix_fmt];
  1631. }

libavutil/pixdesc.c:1631:1: return from a call to av_pix_fmt_desc_get
  1629.         return NULL;
  1630.     return &av_pix_fmt_descriptors[pix_fmt];
  1631. }
        ^
  1632. 
  1633. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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