libavcodec/pcm.c:152: error: Null Dereference
  pointer `avctx->coded_frame` last assigned on line 151 could be null and is dereferenced at line 152, column 5.

libavcodec/pcm.c:107:1: start of procedure pcm_encode_init()
105. }
106. 
107. static av_cold int pcm_encode_init(AVCodecContext *avctx)
     ^
108. {
109.     avctx->frame_size = 1;

libavcodec/pcm.c:109:5: 
107. static av_cold int pcm_encode_init(AVCodecContext *avctx)
108. {
109.     avctx->frame_size = 1;
         ^
110.     switch(avctx->codec->id) {
111.     case CODEC_ID_PCM_ALAW:

libavcodec/pcm.c:110:5: 
108. {
109.     avctx->frame_size = 1;
110.     switch(avctx->codec->id) {
         ^
111.     case CODEC_ID_PCM_ALAW:
112.         build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);

libavcodec/pcm.c:111:5: Switch condition is false. Skipping switch case
109.     avctx->frame_size = 1;
110.     switch(avctx->codec->id) {
111.     case CODEC_ID_PCM_ALAW:
         ^
112.         build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);
113.         break;

libavcodec/pcm.c:114:5: Switch condition is false. Skipping switch case
112.         build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);
113.         break;
114.     case CODEC_ID_PCM_MULAW:
         ^
115.         build_xlaw_table(linear_to_ulaw, ulaw2linear, 0xff);
116.         break;

libavcodec/pcm.c:121:5: 
119.     }
120. 
121.     switch(avctx->codec->id) {
         ^
122.     case CODEC_ID_PCM_S32LE:
123.     case CODEC_ID_PCM_S32BE:

libavcodec/pcm.c:122:5: Switch condition is false. Skipping switch case
120. 
121.     switch(avctx->codec->id) {
122.     case CODEC_ID_PCM_S32LE:
         ^
123.     case CODEC_ID_PCM_S32BE:
124.     case CODEC_ID_PCM_U32LE:

libavcodec/pcm.c:123:5: Switch condition is false. Skipping switch case
121.     switch(avctx->codec->id) {
122.     case CODEC_ID_PCM_S32LE:
123.     case CODEC_ID_PCM_S32BE:
         ^
124.     case CODEC_ID_PCM_U32LE:
125.     case CODEC_ID_PCM_U32BE:

libavcodec/pcm.c:124:5: Switch condition is false. Skipping switch case
122.     case CODEC_ID_PCM_S32LE:
123.     case CODEC_ID_PCM_S32BE:
124.     case CODEC_ID_PCM_U32LE:
         ^
125.     case CODEC_ID_PCM_U32BE:
126.         avctx->block_align = 4 * avctx->channels;

libavcodec/pcm.c:125:5: Switch condition is false. Skipping switch case
123.     case CODEC_ID_PCM_S32BE:
124.     case CODEC_ID_PCM_U32LE:
125.     case CODEC_ID_PCM_U32BE:
         ^
126.         avctx->block_align = 4 * avctx->channels;
127.         break;

libavcodec/pcm.c:128:5: Switch condition is false. Skipping switch case
126.         avctx->block_align = 4 * avctx->channels;
127.         break;
128.     case CODEC_ID_PCM_S24LE:
         ^
129.     case CODEC_ID_PCM_S24BE:
130.     case CODEC_ID_PCM_U24LE:

libavcodec/pcm.c:129:5: Switch condition is false. Skipping switch case
127.         break;
128.     case CODEC_ID_PCM_S24LE:
129.     case CODEC_ID_PCM_S24BE:
         ^
130.     case CODEC_ID_PCM_U24LE:
131.     case CODEC_ID_PCM_U24BE:

libavcodec/pcm.c:130:5: Switch condition is false. Skipping switch case
128.     case CODEC_ID_PCM_S24LE:
129.     case CODEC_ID_PCM_S24BE:
130.     case CODEC_ID_PCM_U24LE:
         ^
131.     case CODEC_ID_PCM_U24BE:
132.     case CODEC_ID_PCM_S24DAUD:

libavcodec/pcm.c:131:5: Switch condition is false. Skipping switch case
129.     case CODEC_ID_PCM_S24BE:
130.     case CODEC_ID_PCM_U24LE:
131.     case CODEC_ID_PCM_U24BE:
         ^
132.     case CODEC_ID_PCM_S24DAUD:
133.         avctx->block_align = 3 * avctx->channels;

libavcodec/pcm.c:132:5: Switch condition is false. Skipping switch case
130.     case CODEC_ID_PCM_U24LE:
131.     case CODEC_ID_PCM_U24BE:
132.     case CODEC_ID_PCM_S24DAUD:
         ^
133.         avctx->block_align = 3 * avctx->channels;
134.         break;

libavcodec/pcm.c:135:5: Switch condition is true. Entering switch case
133.         avctx->block_align = 3 * avctx->channels;
134.         break;
135.     case CODEC_ID_PCM_S16LE:
         ^
136.     case CODEC_ID_PCM_S16BE:
137.     case CODEC_ID_PCM_U16LE:

libavcodec/pcm.c:139:9: 
137.     case CODEC_ID_PCM_U16LE:
138.     case CODEC_ID_PCM_U16BE:
139.         avctx->block_align = 2 * avctx->channels;
             ^
140.         break;
141.     case CODEC_ID_PCM_S8:

libavcodec/pcm.c:151:5: 
149.     }
150. 
151.     avctx->coded_frame= avcodec_alloc_frame();
         ^
152.     avctx->coded_frame->key_frame= 1;
153. 

libavcodec/utils.c:831:1: start of procedure avcodec_alloc_frame()
  829. }
  830. 
  831. AVFrame *avcodec_alloc_frame(void){
       ^
  832.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  833. 

libavcodec/utils.c:832:5: 
  830. 
  831. AVFrame *avcodec_alloc_frame(void){
  832.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  833. 
  834.     if(pic==NULL) return NULL;

libavutil/mem.c:42:1: start of procedure av_malloc()
    40.    linker will do it automatically */
    41. 
    42. void *av_malloc(unsigned int size)
        ^
    43. {
    44.     void *ptr;

libavutil/mem.c:50:8: Taking false branch
    48. 
    49.     /* let's disallow possible ambiguous cases */
    50.     if(size > (INT_MAX-16) )
               ^
    51.         return NULL;
    52. 

libavutil/mem.c:61:5: Skipping memalign(): method has no implementation
    59.     ((char*)ptr)[-1]= diff;
    60. #elif defined (HAVE_MEMALIGN)
    61.     ptr = memalign(16,size);
            ^
    62.     /* Why 64?
    63.        Indeed, we should align it:

libavutil/mem.c:91:5: 
    89.     ptr = malloc(size);
    90. #endif
    91.     return ptr;
            ^
    92. }
    93. 

libavutil/mem.c:92:1: return from a call to av_malloc
    90. #endif
    91.     return ptr;
    92. }
        ^
    93. 
    94. void *av_realloc(void *ptr, unsigned int size)

libavcodec/utils.c:834:8: Taking true branch
  832.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  833. 
  834.     if(pic==NULL) return NULL;
              ^
  835. 
  836.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:834:19: 
  832.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  833. 
  834.     if(pic==NULL) return NULL;
                         ^
  835. 
  836.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:839:1: return from a call to avcodec_alloc_frame
  837. 
  838.     return pic;
  839. }
       ^
  840. 
  841. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/pcm.c:152:5: 
150. 
151.     avctx->coded_frame= avcodec_alloc_frame();
152.     avctx->coded_frame->key_frame= 1;
         ^
153. 
154.     return 0;
