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

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

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

libavcodec/mpegvideo.c:1695:16: Taking false branch
1693.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1694.         ff_xvmc_field_end(s);
1695.    } else if ((s->er.error_count || s->encoding) &&
                     ^
1696.               !s->avctx->hwaccel &&
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1695:37: Taking true branch
1693.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1694.         ff_xvmc_field_end(s);
1695.    } else if ((s->er.error_count || s->encoding) &&
                                          ^
1696.               !s->avctx->hwaccel &&
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1696:16: Taking true branch
1694.         ff_xvmc_field_end(s);
1695.    } else if ((s->er.error_count || s->encoding) &&
1696.               !s->avctx->hwaccel &&
                     ^
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1698.               s->unrestricted_mv &&

libavcodec/mpegvideo.c:1697:17: Taking true branch
1695.    } else if ((s->er.error_count || s->encoding) &&
1696.               !s->avctx->hwaccel &&
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
                      ^
1698.               s->unrestricted_mv &&
1699.               s->current_picture.reference &&

libavcodec/mpegvideo.c:1698:15: Taking true branch
1696.               !s->avctx->hwaccel &&
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1698.               s->unrestricted_mv &&
                    ^
1699.               s->current_picture.reference &&
1700.               !s->intra_only &&

libavcodec/mpegvideo.c:1699:15: Taking true branch
1697.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1698.               s->unrestricted_mv &&
1699.               s->current_picture.reference &&
                    ^
1700.               !s->intra_only &&
1701.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:1700:16: Taking true branch
1698.               s->unrestricted_mv &&
1699.               s->current_picture.reference &&
1700.               !s->intra_only &&
                     ^
1701.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1702.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:1701:17: Taking true branch
1699.               s->current_picture.reference &&
1700.               !s->intra_only &&
1701.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
                      ^
1702.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1703.        int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo.c:1702:8: 
1700.               !s->intra_only &&
1701.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1702.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
             ^
1703.        int hshift = desc->log2_chroma_w;
1704.        int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1464:1: start of procedure av_pix_fmt_desc_get()
  1462. }
  1463. 
  1464. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1465. {
  1466.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1466:9: Taking false branch
  1464. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1465. {
  1466.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1467.         return NULL;
  1468.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1466:24: Taking true branch
  1464. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1465. {
  1466.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1467.         return NULL;
  1468.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1467:9: 
  1465. {
  1466.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1467.         return NULL;
                ^
  1468.     return &av_pix_fmt_descriptors[pix_fmt];
  1469. }

libavutil/pixdesc.c:1469:1: return from a call to av_pix_fmt_desc_get
  1467.         return NULL;
  1468.     return &av_pix_fmt_descriptors[pix_fmt];
  1469. }
        ^
  1470. 
  1471. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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