libavfilter/vf_showinfo.c:50: error: Null Dereference
  pointer `desc` last assigned on line 48 could be null and is dereferenced at line 50, column 26.

libavfilter/vf_showinfo.c:44:1: start of procedure filter_frame()
42. }
43. 
44. static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
    ^
45. {
46.     AVFilterContext *ctx = inlink->dst;

libavfilter/vf_showinfo.c:46:5: 
44. static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
45. {
46.     AVFilterContext *ctx = inlink->dst;
        ^
47.     ShowInfoContext *showinfo = ctx->priv;
48.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);

libavfilter/vf_showinfo.c:47:5: 
45. {
46.     AVFilterContext *ctx = inlink->dst;
47.     ShowInfoContext *showinfo = ctx->priv;
        ^
48.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
49.     uint32_t plane_checksum[4] = {0}, checksum = 0;

libavfilter/vf_showinfo.c:48:5: 
46.     AVFilterContext *ctx = inlink->dst;
47.     ShowInfoContext *showinfo = ctx->priv;
48.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
        ^
49.     uint32_t plane_checksum[4] = {0}, checksum = 0;
50.     int i, plane, vsub = desc->log2_chroma_h;

libavutil/pixdesc.c:1440:1: start of procedure av_pix_fmt_desc_get()
  1438. }
  1439. 
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1442:9: Taking false branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1442:24: Taking true branch
  1440. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1443:9: 
  1441. {
  1442.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1443.         return NULL;
                ^
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }

libavutil/pixdesc.c:1445:1: return from a call to av_pix_fmt_desc_get
  1443.         return NULL;
  1444.     return &av_pix_fmt_descriptors[pix_fmt];
  1445. }
        ^
  1446. 
  1447. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavfilter/vf_showinfo.c:49:5: 
47.     ShowInfoContext *showinfo = ctx->priv;
48.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
49.     uint32_t plane_checksum[4] = {0}, checksum = 0;
        ^
50.     int i, plane, vsub = desc->log2_chroma_h;
51. 

libavfilter/vf_showinfo.c:50:5: 
48.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
49.     uint32_t plane_checksum[4] = {0}, checksum = 0;
50.     int i, plane, vsub = desc->log2_chroma_h;
        ^
51. 
52.     for (plane = 0; frame->data[plane] && plane < 4; plane++) {

static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
{
    AVFilterContext *ctx = inlink->dst;
    ShowInfoContext *showinfo = ctx->priv;
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
    uint32_t plane_checksum[4] = {0}, checksum = 0;
    int i, plane, vsub = desc->log2_chroma_h;
    for (plane = 0; frame->data[plane] && plane < 4; plane++) {
        size_t linesize = av_image_get_linesize(frame->format, frame->width, plane);
        uint8_t *data = frame->data[plane];
        int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h;
        for (i = 0; i < h; i++) {
            plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize);
            checksum = av_adler32_update(checksum, data, linesize);
            data += frame->linesize[plane];
        }
    }
    av_log(ctx, AV_LOG_INFO,
           "n:%d pts:%"PRId64" pts_time:%f "
           "fmt:%s sar:%d/%d s:%dx%d i:%c iskey:%d type:%c "
           "checksum:%u plane_checksum:[%u %u %u %u]\n",
           showinfo->frame,
           frame->pts, frame->pts * av_q2d(inlink->time_base),
           desc->name,
           frame->sample_aspect_ratio.num, frame->sample_aspect_ratio.den,
           frame->width, frame->height,
           !frame->interlaced_frame ? 'P' :
           frame->top_field_first   ? 'T' : 'B',
           frame->key_frame,
           av_get_picture_type_char(frame->pict_type),
           checksum, plane_checksum[0], plane_checksum[1], plane_checksum[2], plane_checksum[3]);
    showinfo->frame++;
    return ff_filter_frame(inlink->dst->outputs[0], frame);
}
['static int filter_frame(AVFilterLink *inlink, AVFrame *frame)\n{\n    AVFilterContext *ctx = inlink->dst;\n    ShowInfoContext *showinfo = ctx->priv;\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);\n    uint32_t plane_checksum[4] = {0}, checksum = 0;\n    int i, plane, vsub = desc->log2_chroma_h;\n    for (plane = 0; frame->data[plane] && plane < 4; plane++) {\n        size_t linesize = av_image_get_linesize(frame->format, frame->width, plane);\n        uint8_t *data = frame->data[plane];\n        int h = plane == 1 || plane == 2 ? inlink->h >> vsub : inlink->h;\n        for (i = 0; i < h; i++) {\n            plane_checksum[plane] = av_adler32_update(plane_checksum[plane], data, linesize);\n            checksum = av_adler32_update(checksum, data, linesize);\n            data += frame->linesize[plane];\n        }\n    }\n    av_log(ctx, AV_LOG_INFO,\n           "n:%d pts:%"PRId64" pts_time:%f "\n           "fmt:%s sar:%d/%d s:%dx%d i:%c iskey:%d type:%c "\n           "checksum:%u plane_checksum:[%u %u %u %u]\\n",\n           showinfo->frame,\n           frame->pts, frame->pts * av_q2d(inlink->time_base),\n           desc->name,\n           frame->sample_aspect_ratio.num, frame->sample_aspect_ratio.den,\n           frame->width, frame->height,\n           !frame->interlaced_frame ? \'P\' :\n           frame->top_field_first   ? \'T\' : \'B\',\n           frame->key_frame,\n           av_get_picture_type_char(frame->pict_type),\n           checksum, plane_checksum[0], plane_checksum[1], plane_checksum[2], plane_checksum[3]);\n    showinfo->frame++;\n    return ff_filter_frame(inlink->dst->outputs[0], frame);\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}']