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

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

libavcodec/mpegvideo.c:2382:26: Condition is true
2380.  */
2381. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2382.     const int field_pic= s->picture_structure != PICT_FRAME;
                               ^
2383.     if(field_pic){
2384.         h <<= 1;

libavcodec/mpegvideo.c:2382:5: 
2380.  */
2381. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2382.     const int field_pic= s->picture_structure != PICT_FRAME;
          ^
2383.     if(field_pic){
2384.         h <<= 1;

libavcodec/mpegvideo.c:2383:8: Taking true branch
2381. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2382.     const int field_pic= s->picture_structure != PICT_FRAME;
2383.     if(field_pic){
             ^
2384.         h <<= 1;
2385.         y <<= 1;

libavcodec/mpegvideo.c:2384:9: 
2382.     const int field_pic= s->picture_structure != PICT_FRAME;
2383.     if(field_pic){
2384.         h <<= 1;
              ^
2385.         y <<= 1;
2386.     }

libavcodec/mpegvideo.c:2385:9: 
2383.     if(field_pic){
2384.         h <<= 1;
2385.         y <<= 1;
              ^
2386.     }
2387. 

libavcodec/mpegvideo.c:2388:10: Taking true branch
2386.     }
2387. 
2388.     if (!s->avctx->hwaccel
               ^
2389.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2390.        && s->unrestricted_mv

libavcodec/mpegvideo.c:2389:13: Taking true branch
2387. 
2388.     if (!s->avctx->hwaccel
2389.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
                  ^
2390.        && s->unrestricted_mv
2391.        && s->current_picture.f.reference

libavcodec/mpegvideo.c:2390:11: Taking true branch
2388.     if (!s->avctx->hwaccel
2389.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2390.        && s->unrestricted_mv
                ^
2391.        && s->current_picture.f.reference
2392.        && !s->intra_only

libavcodec/mpegvideo.c:2391:11: Taking true branch
2389.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2390.        && s->unrestricted_mv
2391.        && s->current_picture.f.reference
                ^
2392.        && !s->intra_only
2393.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:2392:12: Taking true branch
2390.        && s->unrestricted_mv
2391.        && s->current_picture.f.reference
2392.        && !s->intra_only
                 ^
2393.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2394.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:2393:13: Taking true branch
2391.        && s->current_picture.f.reference
2392.        && !s->intra_only
2393.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
                  ^
2394.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2395.         int sides = 0, edge_h;

libavcodec/mpegvideo.c:2394:9: 
2392.        && !s->intra_only
2393.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2394.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
2395.         int sides = 0, edge_h;
2396.         int hshift = desc->log2_chroma_w;

libavutil/pixdesc.c:1434:1: start of procedure av_pix_fmt_desc_get()
  1432. }
  1433. 
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1436:9: Taking false branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1436:24: Taking true branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1437:9: 
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1437.         return NULL;
                ^
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }

libavutil/pixdesc.c:1439:1: return from a call to av_pix_fmt_desc_get
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }
        ^
  1440. 
  1441. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/mpegvideo.c:2395:9: 
2393.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2394.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2395.         int sides = 0, edge_h;
              ^
2396.         int hshift = desc->log2_chroma_w;
2397.         int vshift = desc->log2_chroma_h;

libavcodec/mpegvideo.c:2396:9: 
2394.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2395.         int sides = 0, edge_h;
2396.         int hshift = desc->log2_chroma_w;
              ^
2397.         int vshift = desc->log2_chroma_h;
2398.         if (y==0) sides |= EDGE_TOP;
