libavcodec/mpegvideo.c:1698: error: Null Dereference
  pointer `desc` last assigned on line 1697 could be null and is dereferenced at line 1698, column 21.

libavcodec/mpegvideo.c:1684:1: start of procedure ff_MPV_frame_end()
1682. /* generic function for encode/decode called after a
1683.  * frame has been coded/decoded. */
1684. void ff_MPV_frame_end(MpegEncContext *s)
      ^
1685. {
1686.     int i;

libavcodec/mpegvideo.c:1689:9: Taking false branch
1687.     /* redraw edges for the frame if decoding didn't complete */
1688.     // just to make sure that all data is rendered.
1689.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
              ^
1690.         ff_xvmc_field_end(s);
1691.    } else if ((s->er.error_count || s->encoding) &&

libavcodec/mpegvideo.c:1691:16: Taking false branch
1689.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1690.         ff_xvmc_field_end(s);
1691.    } else if ((s->er.error_count || s->encoding) &&
                     ^
1692.               !s->avctx->hwaccel &&
1693.               s->unrestricted_mv &&

libavcodec/mpegvideo.c:1691:37: Taking true branch
1689.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1690.         ff_xvmc_field_end(s);
1691.    } else if ((s->er.error_count || s->encoding) &&
                                          ^
1692.               !s->avctx->hwaccel &&
1693.               s->unrestricted_mv &&

libavcodec/mpegvideo.c:1692:16: Taking true branch
1690.         ff_xvmc_field_end(s);
1691.    } else if ((s->er.error_count || s->encoding) &&
1692.               !s->avctx->hwaccel &&
                     ^
1693.               s->unrestricted_mv &&
1694.               s->current_picture.reference &&

libavcodec/mpegvideo.c:1693:15: Taking true branch
1691.    } else if ((s->er.error_count || s->encoding) &&
1692.               !s->avctx->hwaccel &&
1693.               s->unrestricted_mv &&
                    ^
1694.               s->current_picture.reference &&
1695.               !s->intra_only &&

libavcodec/mpegvideo.c:1694:15: Taking true branch
1692.               !s->avctx->hwaccel &&
1693.               s->unrestricted_mv &&
1694.               s->current_picture.reference &&
                    ^
1695.               !s->intra_only &&
1696.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:1695:16: Taking true branch
1693.               s->unrestricted_mv &&
1694.               s->current_picture.reference &&
1695.               !s->intra_only &&
                     ^
1696.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1697.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:1696:17: Taking true branch
1694.               s->current_picture.reference &&
1695.               !s->intra_only &&
1696.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
                      ^
1697.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1698.        int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo.c:1697:8: 
1695.               !s->intra_only &&
1696.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1697.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
             ^
1698.        int hshift = desc->log2_chroma_w;
1699.        int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1504:1: start of procedure av_pix_fmt_desc_get()
  1502. }
  1503. 
  1504. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1505. {
  1506.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1506:9: Taking false branch
  1504. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1505. {
  1506.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1507.         return NULL;
  1508.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1506:24: Taking true branch
  1504. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1505. {
  1506.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1507.         return NULL;
  1508.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1507:9: 
  1505. {
  1506.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1507.         return NULL;
                ^
  1508.     return &av_pix_fmt_descriptors[pix_fmt];
  1509. }

libavutil/pixdesc.c:1509:1: return from a call to av_pix_fmt_desc_get
  1507.         return NULL;
  1508.     return &av_pix_fmt_descriptors[pix_fmt];
  1509. }
        ^
  1510. 
  1511. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/mpegvideo.c:1698:8: 
1696.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1697.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1698.        int hshift = desc->log2_chroma_w;
             ^
1699.        int vshift = desc->log2_chroma_h;
1700.        s->dsp.draw_edges(s->current_picture.f.data[0], s->linesize,
