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

libavcodec/mpegvideo.c:1585:1: start of procedure ff_MPV_frame_end()
1583. /* generic function for encode/decode called after a
1584.  * frame has been coded/decoded. */
1585. void ff_MPV_frame_end(MpegEncContext *s)
      ^
1586. {
1587.     int i;

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

libavcodec/mpegvideo.c:1592:16: Taking false branch
1590.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1591.         ff_xvmc_field_end(s);
1592.    } else if ((s->error_count || s->encoding) &&
                     ^
1593.               !s->avctx->hwaccel &&
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1592:34: Taking true branch
1590.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1591.         ff_xvmc_field_end(s);
1592.    } else if ((s->error_count || s->encoding) &&
                                       ^
1593.               !s->avctx->hwaccel &&
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1593:16: Taking true branch
1591.         ff_xvmc_field_end(s);
1592.    } else if ((s->error_count || s->encoding) &&
1593.               !s->avctx->hwaccel &&
                     ^
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1595.               s->unrestricted_mv &&

libavcodec/mpegvideo.c:1594:17: Taking true branch
1592.    } else if ((s->error_count || s->encoding) &&
1593.               !s->avctx->hwaccel &&
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
                      ^
1595.               s->unrestricted_mv &&
1596.               s->current_picture.f.reference &&

libavcodec/mpegvideo.c:1595:15: Taking true branch
1593.               !s->avctx->hwaccel &&
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1595.               s->unrestricted_mv &&
                    ^
1596.               s->current_picture.f.reference &&
1597.               !s->intra_only &&

libavcodec/mpegvideo.c:1596:15: Taking true branch
1594.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1595.               s->unrestricted_mv &&
1596.               s->current_picture.f.reference &&
                    ^
1597.               !s->intra_only &&
1598.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:1597:16: Taking true branch
1595.               s->unrestricted_mv &&
1596.               s->current_picture.f.reference &&
1597.               !s->intra_only &&
                     ^
1598.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1599.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:1598:17: Taking true branch
1596.               s->current_picture.f.reference &&
1597.               !s->intra_only &&
1598.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
                      ^
1599.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1600.        int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo.c:1599:8: 
1597.               !s->intra_only &&
1598.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1599.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
             ^
1600.        int hshift = desc->log2_chroma_w;
1601.        int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1440:1: start of procedure av_pix_fmt_desc_get()
  1438. }
  1439. 
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1442:9: Taking false branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1442:24: Taking true branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1443:9: 
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1443.         return NULL;
                ^
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }

libavutil/pixdesc.c:1445:1: return from a call to av_pix_fmt_desc_get
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }
        ^
  1446. 
  1447. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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