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

libavcodec/mpegvideo.c:1514:1: start of procedure ff_MPV_frame_end()
1512. /* generic function for encode/decode called after a
1513.  * frame has been coded/decoded. */
1514. void ff_MPV_frame_end(MpegEncContext *s)
      ^
1515. {
1516.     int i;

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

libavcodec/mpegvideo.c:1521:16: Taking false branch
1519.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1520.         ff_xvmc_field_end(s);
1521.    } else if ((s->error_count || s->encoding) &&
                     ^
1522.               !s->avctx->hwaccel &&
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1521:34: Taking true branch
1519.     if (CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration) {
1520.         ff_xvmc_field_end(s);
1521.    } else if ((s->error_count || s->encoding) &&
                                       ^
1522.               !s->avctx->hwaccel &&
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&

libavcodec/mpegvideo.c:1522:16: Taking true branch
1520.         ff_xvmc_field_end(s);
1521.    } else if ((s->error_count || s->encoding) &&
1522.               !s->avctx->hwaccel &&
                     ^
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1524.               s->unrestricted_mv &&

libavcodec/mpegvideo.c:1523:17: Taking true branch
1521.    } else if ((s->error_count || s->encoding) &&
1522.               !s->avctx->hwaccel &&
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
                      ^
1524.               s->unrestricted_mv &&
1525.               s->current_picture.f.reference &&

libavcodec/mpegvideo.c:1524:15: Taking true branch
1522.               !s->avctx->hwaccel &&
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1524.               s->unrestricted_mv &&
                    ^
1525.               s->current_picture.f.reference &&
1526.               !s->intra_only &&

libavcodec/mpegvideo.c:1525:15: Taking true branch
1523.               !(s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) &&
1524.               s->unrestricted_mv &&
1525.               s->current_picture.f.reference &&
                    ^
1526.               !s->intra_only &&
1527.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:1526:16: Taking true branch
1524.               s->unrestricted_mv &&
1525.               s->current_picture.f.reference &&
1526.               !s->intra_only &&
                     ^
1527.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1528.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:1527:17: Taking true branch
1525.               s->current_picture.f.reference &&
1526.               !s->intra_only &&
1527.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
                      ^
1528.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
1529.        int hshift = desc->log2_chroma_w;

libavcodec/mpegvideo.c:1528:8: 
1526.               !s->intra_only &&
1527.               !(s->flags & CODEC_FLAG_EMU_EDGE)) {
1528.        const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
             ^
1529.        int hshift = desc->log2_chroma_w;
1530.        int vshift = desc->log2_chroma_h;

libavutil/pixdesc.c:1199:1: start of procedure av_pix_fmt_desc_get()
  1197. }
  1198. 
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1201:9: Taking false branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1201:24: Taking true branch
  1199. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1202:9: 
  1200. {
  1201.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1202.         return NULL;
                ^
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }

libavutil/pixdesc.c:1204:1: return from a call to av_pix_fmt_desc_get
  1202.         return NULL;
  1203.     return &av_pix_fmt_descriptors[pix_fmt];
  1204. }
        ^
  1205. 
  1206. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

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