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

libavcodec/h264dec.c:86:1: start of procedure ff_h264_draw_horiz_band()
84. }
85. 
86. void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl,
    ^
87.                              int y, int height)
88. {

libavcodec/h264dec.c:89:5: 
87.                              int y, int height)
88. {
89.     AVCodecContext *avctx = h->avctx;
        ^
90.     const AVFrame   *src  = h->cur_pic.f;
91.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);

libavcodec/h264dec.c:90:5: 
88. {
89.     AVCodecContext *avctx = h->avctx;
90.     const AVFrame   *src  = h->cur_pic.f;
        ^
91.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
92.     int vshift = desc->log2_chroma_h;

libavcodec/h264dec.c:91:5: 
89.     AVCodecContext *avctx = h->avctx;
90.     const AVFrame   *src  = h->cur_pic.f;
91.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
        ^
92.     int vshift = desc->log2_chroma_h;
93.     const int field_pic = h->picture_structure != PICT_FRAME;

libavutil/pixdesc.c:1901:1: start of procedure av_pix_fmt_desc_get()
  1899. }
  1900. 
  1901. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1902. {
  1903.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1903:9: Taking false branch
  1901. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1902. {
  1903.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1904.         return NULL;
  1905.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1903:24: Taking true branch
  1901. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1902. {
  1903.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1904.         return NULL;
  1905.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1904:9: 
  1902. {
  1903.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1904.         return NULL;
                ^
  1905.     return &av_pix_fmt_descriptors[pix_fmt];
  1906. }

libavutil/pixdesc.c:1906:1: return from a call to av_pix_fmt_desc_get
  1904.         return NULL;
  1905.     return &av_pix_fmt_descriptors[pix_fmt];
  1906. }
        ^
  1907. 
  1908. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/h264dec.c:92:5: 
90.     const AVFrame   *src  = h->cur_pic.f;
91.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
92.     int vshift = desc->log2_chroma_h;
        ^
93.     const int field_pic = h->picture_structure != PICT_FRAME;
94.     if (field_pic) {

void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl,
                             int y, int height)
{
    AVCodecContext *avctx = h->avctx;
    const AVFrame   *src  = h->cur_pic.f;
    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) {
        int offset[AV_NUM_DATA_POINTERS];
        int i;
        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(const H264Context *h, H264SliceContext *sl,\n                             int y, int height)\n{\n    AVCodecContext *avctx = h->avctx;\n    const AVFrame   *src  = h->cur_pic.f;\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        int offset[AV_NUM_DATA_POINTERS];\n        int i;\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}']