libavcodec/rawenc.c:44: error: Null Dereference
  pointer `desc` last assigned on line 36 could be null and is dereferenced by call to `av_get_bits_per_pixel()` at line 44, column 36.

libavcodec/rawenc.c:34:1: start of procedure raw_encode_init()
32. #include "libavutil/internal.h"
33. 
34. static av_cold int raw_encode_init(AVCodecContext *avctx)
    ^
35. {
36.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);

libavcodec/rawenc.c:36:5: 
34. static av_cold int raw_encode_init(AVCodecContext *avctx)
35. {
36.     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
        ^
37. 
38. #if FF_API_CODED_FRAME

libavutil/pixdesc.c:1682:1: start of procedure av_pix_fmt_desc_get()
  1680. }
  1681. 
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
        ^
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)

libavutil/pixdesc.c:1684:9: Taking false branch
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                ^
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1684:24: Taking true branch
  1682. const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
                               ^
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];

libavutil/pixdesc.c:1685:9: 
  1683. {
  1684.     if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)
  1685.         return NULL;
                ^
  1686.     return &av_pix_fmt_descriptors[pix_fmt];
  1687. }

libavutil/pixdesc.c:1687:1: return from a call to av_pix_fmt_desc_get
  1685.         return NULL;
  1686.     return &av_pix_fmt_descriptors[pix_fmt];
  1687. }
        ^
  1688. 
  1689. const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)

libavcodec/rawenc.c:40:5: 
38. #if FF_API_CODED_FRAME
39. FF_DISABLE_DEPRECATION_WARNINGS
40.     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
        ^
41.     avctx->coded_frame->key_frame = 1;
42. FF_ENABLE_DEPRECATION_WARNINGS

libavcodec/rawenc.c:41:5: 
39. FF_DISABLE_DEPRECATION_WARNINGS
40.     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
41.     avctx->coded_frame->key_frame = 1;
        ^
42. FF_ENABLE_DEPRECATION_WARNINGS
43. #endif

libavcodec/rawenc.c:44:5: 
42. FF_ENABLE_DEPRECATION_WARNINGS
43. #endif
44.     avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
        ^
45.     if(!avctx->codec_tag)
46.         avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);

libavutil/pixdesc.c:1654:1: start of procedure av_get_bits_per_pixel()
  1652. }
  1653. 
  1654. int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
        ^
  1655. {
  1656.     int c, bits = 0;

libavutil/pixdesc.c:1656:5: 
  1654. int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
  1655. {
  1656.     int c, bits = 0;
            ^
  1657.     int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
  1658. 

libavutil/pixdesc.c:1657:5: 
  1655. {
  1656.     int c, bits = 0;
  1657.     int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h;
            ^
  1658. 
  1659.     for (c = 0; c < pixdesc->nb_components; c++) {
