libavcodec/imgconvert.c:53: error: Null Dereference
  pointer `desc` last assigned on line 52 could be null and is dereferenced at line 53, column 16.

libavcodec/imgconvert.c:50:1: start of procedure avcodec_get_chroma_sub_sample()
48. #endif
49. 
50. void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
    ^
51. {
52.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);

libavcodec/imgconvert.c:52:5: 
50. void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
51. {
52.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
        ^
53.     *h_shift = desc->log2_chroma_w;
54.     *v_shift = desc->log2_chroma_h;

libavutil/pixdesc.c:1559:1: start of procedure av_pix_fmt_desc_get()
  1557. }
  1558. 
  1559. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1560. {
  1561.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1561:9: Taking false branch
  1559. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1560. {
  1561.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1562.         return NULL;
  1563.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1561:24: Taking true branch
  1559. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1560. {
  1561.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1562.         return NULL;
  1563.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1562:9: 
  1560. {
  1561.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1562.         return NULL;
                ^
  1563.     return &av_pix_fmt_descriptors[pix_fmt];
  1564. }

libavutil/pixdesc.c:1564:1: return from a call to av_pix_fmt_desc_get
  1562.         return NULL;
  1563.     return &av_pix_fmt_descriptors[pix_fmt];
  1564. }
        ^
  1565. 
  1566. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/imgconvert.c:53:5: 
51. {
52.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
53.     *h_shift = desc->log2_chroma_w;
        ^
54.     *v_shift = desc->log2_chroma_h;
55. }

void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
    *h_shift = desc->log2_chroma_w;
    *v_shift = desc->log2_chroma_h;
}
['void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);\n    *h_shift = desc->log2_chroma_w;\n    *v_shift = desc->log2_chroma_h;\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}']