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

libavcodec/mpegvideo.c:2390:1: start of procedure ff_draw_horiz_band()
2388.  * @param h is the normal height, this will be reduced automatically if needed for the last row
2389.  */
2390. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
      ^
2391.     const int field_pic= s->picture_structure != PICT_FRAME;
2392.     if(field_pic){

libavcodec/mpegvideo.c:2391:26: Condition is true
2389.  */
2390. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2391.     const int field_pic= s->picture_structure != PICT_FRAME;
                               ^
2392.     if(field_pic){
2393.         h <<= 1;

libavcodec/mpegvideo.c:2391:5: 
2389.  */
2390. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2391.     const int field_pic= s->picture_structure != PICT_FRAME;
          ^
2392.     if(field_pic){
2393.         h <<= 1;

libavcodec/mpegvideo.c:2392:8: Taking true branch
2390. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2391.     const int field_pic= s->picture_structure != PICT_FRAME;
2392.     if(field_pic){
             ^
2393.         h <<= 1;
2394.         y <<= 1;

libavcodec/mpegvideo.c:2393:9: 
2391.     const int field_pic= s->picture_structure != PICT_FRAME;
2392.     if(field_pic){
2393.         h <<= 1;
              ^
2394.         y <<= 1;
2395.     }

libavcodec/mpegvideo.c:2394:9: 
2392.     if(field_pic){
2393.         h <<= 1;
2394.         y <<= 1;
              ^
2395.     }
2396. 

libavcodec/mpegvideo.c:2397:10: Taking true branch
2395.     }
2396. 
2397.     if (!s->avctx->hwaccel
               ^
2398.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2399.        && s->unrestricted_mv

libavcodec/mpegvideo.c:2398:13: Taking true branch
2396. 
2397.     if (!s->avctx->hwaccel
2398.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
                  ^
2399.        && s->unrestricted_mv
2400.        && s->current_picture.f.reference

libavcodec/mpegvideo.c:2399:11: Taking true branch
2397.     if (!s->avctx->hwaccel
2398.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2399.        && s->unrestricted_mv
                ^
2400.        && s->current_picture.f.reference
2401.        && !s->intra_only

libavcodec/mpegvideo.c:2400:11: Taking true branch
2398.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2399.        && s->unrestricted_mv
2400.        && s->current_picture.f.reference
                ^
2401.        && !s->intra_only
2402.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:2401:12: Taking true branch
2399.        && s->unrestricted_mv
2400.        && s->current_picture.f.reference
2401.        && !s->intra_only
                 ^
2402.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2403.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:2402:13: Taking true branch
2400.        && s->current_picture.f.reference
2401.        && !s->intra_only
2402.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
                  ^
2403.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2404.         int sides = 0, edge_h;

libavcodec/mpegvideo.c:2403:9: 
2401.        && !s->intra_only
2402.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2403.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
2404.         int sides = 0, edge_h;
2405.         int hshift = desc->log2_chroma_w;

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:2404:9: 
2402.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2403.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2404.         int sides = 0, edge_h;
              ^
2405.         int hshift = desc->log2_chroma_w;
2406.         int vshift = desc->log2_chroma_h;

libavcodec/mpegvideo.c:2405:9: 
2403.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2404.         int sides = 0, edge_h;
2405.         int hshift = desc->log2_chroma_w;
              ^
2406.         int vshift = desc->log2_chroma_h;
2407.         if (y==0) sides |= EDGE_TOP;
