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

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

libavcodec/mpegvideo.c:2332:26: Condition is true
2330.  */
2331. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2332.     const int field_pic= s->picture_structure != PICT_FRAME;
                               ^
2333.     if(field_pic){
2334.         h <<= 1;

libavcodec/mpegvideo.c:2332:5: 
2330.  */
2331. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2332.     const int field_pic= s->picture_structure != PICT_FRAME;
          ^
2333.     if(field_pic){
2334.         h <<= 1;

libavcodec/mpegvideo.c:2333:8: Taking true branch
2331. void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
2332.     const int field_pic= s->picture_structure != PICT_FRAME;
2333.     if(field_pic){
             ^
2334.         h <<= 1;
2335.         y <<= 1;

libavcodec/mpegvideo.c:2334:9: 
2332.     const int field_pic= s->picture_structure != PICT_FRAME;
2333.     if(field_pic){
2334.         h <<= 1;
              ^
2335.         y <<= 1;
2336.     }

libavcodec/mpegvideo.c:2335:9: 
2333.     if(field_pic){
2334.         h <<= 1;
2335.         y <<= 1;
              ^
2336.     }
2337. 

libavcodec/mpegvideo.c:2338:10: Taking true branch
2336.     }
2337. 
2338.     if (!s->avctx->hwaccel
               ^
2339.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2340.        && s->unrestricted_mv

libavcodec/mpegvideo.c:2339:13: Taking true branch
2337. 
2338.     if (!s->avctx->hwaccel
2339.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
                  ^
2340.        && s->unrestricted_mv
2341.        && s->current_picture.f.reference

libavcodec/mpegvideo.c:2340:11: Taking true branch
2338.     if (!s->avctx->hwaccel
2339.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2340.        && s->unrestricted_mv
                ^
2341.        && s->current_picture.f.reference
2342.        && !s->intra_only

libavcodec/mpegvideo.c:2341:11: Taking true branch
2339.        && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
2340.        && s->unrestricted_mv
2341.        && s->current_picture.f.reference
                ^
2342.        && !s->intra_only
2343.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {

libavcodec/mpegvideo.c:2342:12: Taking true branch
2340.        && s->unrestricted_mv
2341.        && s->current_picture.f.reference
2342.        && !s->intra_only
                 ^
2343.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2344.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);

libavcodec/mpegvideo.c:2343:13: Taking true branch
2341.        && s->current_picture.f.reference
2342.        && !s->intra_only
2343.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
                  ^
2344.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2345.         int sides = 0, edge_h;

libavcodec/mpegvideo.c:2344:9: 
2342.        && !s->intra_only
2343.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2344.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
              ^
2345.         int sides = 0, edge_h;
2346.         int hshift = desc->log2_chroma_w;

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:2345:9: 
2343.        && !(s->flags&CODEC_FLAG_EMU_EDGE)) {
2344.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2345.         int sides = 0, edge_h;
              ^
2346.         int hshift = desc->log2_chroma_w;
2347.         int vshift = desc->log2_chroma_h;

libavcodec/mpegvideo.c:2346:9: 
2344.         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->avctx->pix_fmt);
2345.         int sides = 0, edge_h;
2346.         int hshift = desc->log2_chroma_w;
              ^
2347.         int vshift = desc->log2_chroma_h;
2348.         if (y==0) sides |= EDGE_TOP;
