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

libavcodec/h264.c:212:1: start of procedure ff_h264_draw_horiz_band()
210. }
211. 
212. void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
     ^
213. {
214.     AVCodecContext *avctx = h->avctx;

libavcodec/h264.c:214:5: 
212. void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
213. {
214.     AVCodecContext *avctx = h->avctx;
         ^
215.     AVFrame *cur  = &h->cur_pic.f;
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;

libavcodec/h264.c:215:5: 
213. {
214.     AVCodecContext *avctx = h->avctx;
215.     AVFrame *cur  = &h->cur_pic.f;
         ^
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
217.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);

libavcodec/h264.c:216:21: Condition is true
214.     AVCodecContext *avctx = h->avctx;
215.     AVFrame *cur  = &h->cur_pic.f;
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
                         ^
217.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
218.     int vshift = desc->log2_chroma_h;

libavcodec/h264.c:216:5: 
214.     AVCodecContext *avctx = h->avctx;
215.     AVFrame *cur  = &h->cur_pic.f;
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
         ^
217.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
218.     int vshift = desc->log2_chroma_h;

libavcodec/h264.c:217:5: 
215.     AVFrame *cur  = &h->cur_pic.f;
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
217.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
         ^
218.     int vshift = desc->log2_chroma_h;
219.     const int field_pic = h->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/h264.c:218:5: 
216.     AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
217.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
218.     int vshift = desc->log2_chroma_h;
         ^
219.     const int field_pic = h->picture_structure != PICT_FRAME;
220.     if (field_pic) {

void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
{
    AVCodecContext *avctx = h->avctx;
    AVFrame *cur  = &h->cur_pic.f;
    AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
    int vshift = desc->log2_chroma_h;
    const int field_pic = h->picture_structure != PICT_FRAME;
    if (field_pic) {
        height <<= 1;
        y      <<= 1;
    }
    height = FFMIN(height, avctx->height - y);
    if (field_pic && h->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->pict_type == AV_PICTURE_TYPE_B || h->low_delay ||
            (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))
            src = cur;
        else if (last)
            src = last;
        else
            return;
        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, h->picture_structure, height);
    }
}
['void ff_h264_draw_horiz_band(H264Context *h, int y, int height)\n{\n    AVCodecContext *avctx = h->avctx;\n    AVFrame *cur  = &h->cur_pic.f;\n    AVFrame *last = h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0].f : NULL;\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);\n    int vshift = desc->log2_chroma_h;\n    const int field_pic = h->picture_structure != PICT_FRAME;\n    if (field_pic) {\n        height <<= 1;\n        y      <<= 1;\n    }\n    height = FFMIN(height, avctx->height - y);\n    if (field_pic && h->first_field && !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD))\n        return;\n    if (avctx->draw_horiz_band) {\n        AVFrame *src;\n        int offset[AV_NUM_DATA_POINTERS];\n        int i;\n        if (cur->pict_type == AV_PICTURE_TYPE_B || h->low_delay ||\n            (avctx->slice_flags & SLICE_FLAG_CODED_ORDER))\n            src = cur;\n        else if (last)\n            src = last;\n        else\n            return;\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        emms_c();\n        avctx->draw_horiz_band(avctx, src, offset,\n                               y, h->picture_structure, height);\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}']