libavcodec/imgconvert.c:71: error: Null Dereference
  pointer `src_desc` last assigned on line 69 could be null and is dereferenced at line 71, column 34.

libavcodec/imgconvert.c:65:1: start of procedure avcodec_get_pix_fmt_loss()
63. }
64. 
65. int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
    ^
66.                              enum AVPixelFormat src_pix_fmt,
67.                              int has_alpha)

libavcodec/imgconvert.c:69:5: 
67.                              int has_alpha)
68. {
69.     const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
        ^
70.     const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
71.     int loss, i, nb_components = FFMIN(src_desc->nb_components,

libavutil/pixdesc.c:1434:1: start of procedure av_pix_fmt_desc_get()
  1432. }
  1433. 
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1436:9: Taking false branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1436:24: Taking true branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1437:9: 
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1437.         return NULL;
                ^
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }

libavutil/pixdesc.c:1439:1: return from a call to av_pix_fmt_desc_get
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }
        ^
  1440. 
  1441. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/imgconvert.c:70:5: 
68. {
69.     const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
70.     const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
        ^
71.     int loss, i, nb_components = FFMIN(src_desc->nb_components,
72.                                        dst_desc->nb_components);

libavutil/pixdesc.c:1434:1: start of procedure av_pix_fmt_desc_get()
  1432. }
  1433. 
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1436:9: Taking false branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1436:24: Taking true branch
  1434. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1437:9: 
  1435. {
  1436.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1437.         return NULL;
                ^
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }

libavutil/pixdesc.c:1439:1: return from a call to av_pix_fmt_desc_get
  1437.         return NULL;
  1438.     return &av_pix_fmt_descriptors[pix_fmt];
  1439. }
        ^
  1440. 
  1441. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/imgconvert.c:71:34: 
69.     const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
70.     const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
71.     int loss, i, nb_components = FFMIN(src_desc->nb_components,
                                     ^
72.                                        dst_desc->nb_components);
73. 

int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
                             enum AVPixelFormat src_pix_fmt,
                             int has_alpha)
{
    const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);
    const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);
    int loss, i, nb_components = FFMIN(src_desc->nb_components,
                                       dst_desc->nb_components);
    loss = 0;
    if (dst_pix_fmt == src_pix_fmt)
        return 0;
    for (i = 0; i < nb_components; i++)
        if (src_desc->comp[i].depth_minus1 > dst_desc->comp[i].depth_minus1)
            loss |= FF_LOSS_DEPTH;
    if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w ||
        dst_desc->log2_chroma_h > src_desc->log2_chroma_h)
        loss |= FF_LOSS_RESOLUTION;
    if ((src_desc->flags & PIX_FMT_RGB) != (dst_desc->flags & PIX_FMT_RGB))
        loss |= FF_LOSS_COLORSPACE;
    if (has_alpha && !(dst_desc->flags & PIX_FMT_ALPHA) &&
         (dst_desc->flags & PIX_FMT_ALPHA))
        loss |= FF_LOSS_ALPHA;
    if (dst_pix_fmt == AV_PIX_FMT_PAL8 && !is_gray(src_desc))
        return loss | FF_LOSS_COLORQUANT;
    if (src_desc->nb_components > dst_desc->nb_components)
        if (is_gray(dst_desc))
            loss |= FF_LOSS_CHROMA;
    return loss;
}
['int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,\n                             enum AVPixelFormat src_pix_fmt,\n                             int has_alpha)\n{\n    const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt);\n    const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt);\n    int loss, i, nb_components = FFMIN(src_desc->nb_components,\n                                       dst_desc->nb_components);\n    loss = 0;\n    if (dst_pix_fmt == src_pix_fmt)\n        return 0;\n    for (i = 0; i < nb_components; i++)\n        if (src_desc->comp[i].depth_minus1 > dst_desc->comp[i].depth_minus1)\n            loss |= FF_LOSS_DEPTH;\n    if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w ||\n        dst_desc->log2_chroma_h > src_desc->log2_chroma_h)\n        loss |= FF_LOSS_RESOLUTION;\n    if ((src_desc->flags & PIX_FMT_RGB) != (dst_desc->flags & PIX_FMT_RGB))\n        loss |= FF_LOSS_COLORSPACE;\n    if (has_alpha && !(dst_desc->flags & PIX_FMT_ALPHA) &&\n         (dst_desc->flags & PIX_FMT_ALPHA))\n        loss |= FF_LOSS_ALPHA;\n    if (dst_pix_fmt == AV_PIX_FMT_PAL8 && !is_gray(src_desc))\n        return loss | FF_LOSS_COLORQUANT;\n    if (src_desc->nb_components > dst_desc->nb_components)\n        if (is_gray(dst_desc))\n            loss |= FF_LOSS_CHROMA;\n    return loss;\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}']