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

libavcodec/mpegvideo.c:2316:1: start of procedure ff_draw_horiz_band()
2314.  * @param h is the normal height, this will be reduced automatically if needed for the last row
2315.  */
2316. void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
      ^
2317.                         Picture *last, int y, int h, int picture_structure,
2318.                         int first_field, int low_delay,

libavcodec/mpegvideo.c:2321:5: 
2319.                         int v_edge_pos, int h_edge_pos)
2320. {
2321.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
          ^
2322.     int vshift = desc->log2_chroma_h;
2323.     const int field_pic = picture_structure != PICT_FRAME;

libavutil/pixdesc.c:1507:1: start of procedure av_pix_fmt_desc_get()
  1505. }
  1506. 
  1507. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1508. {
  1509.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1509:9: Taking false branch
  1507. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1508. {
  1509.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1510.         return NULL;
  1511.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1509:24: Taking true branch
  1507. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1508. {
  1509.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1510.         return NULL;
  1511.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1510:9: 
  1508. {
  1509.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1510.         return NULL;
                ^
  1511.     return &av_pix_fmt_descriptors[pix_fmt];
  1512. }

libavutil/pixdesc.c:1512:1: return from a call to av_pix_fmt_desc_get
  1510.         return NULL;
  1511.     return &av_pix_fmt_descriptors[pix_fmt];
  1512. }
        ^
  1513. 
  1514. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/mpegvideo.c:2322:5: 
2320. {
2321.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
2322.     int vshift = desc->log2_chroma_h;
          ^
2323.     const int field_pic = picture_structure != PICT_FRAME;
2324.     if(field_pic){

void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,
                        Picture *last, int y, int h, int picture_structure,
                        int first_field, int low_delay,
                        int v_edge_pos, int h_edge_pos)
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
    int vshift = desc->log2_chroma_h;
    const int field_pic = picture_structure != PICT_FRAME;
    if(field_pic){
        h <<= 1;
        y <<= 1;
    }
    h = FFMIN(h, avctx->height - y);
    if(field_pic && first_field && !(avctx->slice_flags&SLICE_FLAG_ALLOW_FIELD)) return;
    if (avctx->draw_horiz_band) {
        AVFrame *src;
        int offset[AV_NUM_DATA_POINTERS];
        int i;
        if(cur->f.pict_type == AV_PICTURE_TYPE_B || low_delay ||
           (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
            src = &cur->f;
        else if (last)
            src = &last->f;
        else
            return;
        if (cur->f.pict_type == AV_PICTURE_TYPE_B &&
            picture_structure == PICT_FRAME &&
            avctx->codec_id != AV_CODEC_ID_SVQ3) {
            for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
                offset[i] = 0;
        }else{
            offset[0]= y * src->linesize[0];
            offset[1]=
            offset[2]= (y >> vshift) * src->linesize[1];
            for (i = 3; i < AV_NUM_DATA_POINTERS; i++)
                offset[i] = 0;
        }
        emms_c();
        avctx->draw_horiz_band(avctx, src, offset,
                               y, picture_structure, h);
    }
}
['void ff_draw_horiz_band(AVCodecContext *avctx, DSPContext *dsp, Picture *cur,\n                        Picture *last, int y, int h, int picture_structure,\n                        int first_field, int low_delay,\n                        int v_edge_pos, int h_edge_pos)\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);\n    int vshift = desc->log2_chroma_h;\n    const int field_pic = picture_structure != PICT_FRAME;\n    if(field_pic){\n        h <<= 1;\n        y <<= 1;\n    }\n    h = FFMIN(h, avctx->height - y);\n    if(field_pic && first_field && !(avctx->slice_flags&SLICE_FLAG_ALLOW_FIELD)) return;\n    if (avctx->draw_horiz_band) {\n        AVFrame *src;\n        int offset[AV_NUM_DATA_POINTERS];\n        int i;\n        if(cur->f.pict_type == AV_PICTURE_TYPE_B || low_delay ||\n           (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))\n            src = &cur->f;\n        else if (last)\n            src = &last->f;\n        else\n            return;\n        if (cur->f.pict_type == AV_PICTURE_TYPE_B &&\n            picture_structure == PICT_FRAME &&\n            avctx->codec_id != AV_CODEC_ID_SVQ3) {\n            for (i = 0; i < AV_NUM_DATA_POINTERS; i++)\n                offset[i] = 0;\n        }else{\n            offset[0]= y * src->linesize[0];\n            offset[1]=\n            offset[2]= (y >> vshift) * src->linesize[1];\n            for (i = 3; i < AV_NUM_DATA_POINTERS; i++)\n                offset[i] = 0;\n        }\n        emms_c();\n        avctx->draw_horiz_band(avctx, src, offset,\n                               y, picture_structure, h);\n    }\n}', 'const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)\n{\n    if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)\n        return NULL;\n    return &av_pix_fmt_descriptors[pix_fmt];\n}']