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

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

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

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

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

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

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

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

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

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

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

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

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

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

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