libavcodec/pcm.c:124: error: Null Dereference
  pointer `avctx->coded_frame` last assigned on line 123 could be null and is dereferenced at line 124, 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.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
         ^
122.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
123.     avctx->coded_frame= avcodec_alloc_frame();

libavcodec/utils.c:851:1: start of procedure av_get_bits_per_sample()
  849. }
  850. 
  851. int av_get_bits_per_sample(enum CodecID codec_id){
       ^
  852.     switch(codec_id){
  853.     case CODEC_ID_ADPCM_SBPRO_2:

libavcodec/utils.c:852:5: 
  850. 
  851. int av_get_bits_per_sample(enum CodecID codec_id){
  852.     switch(codec_id){
           ^
  853.     case CODEC_ID_ADPCM_SBPRO_2:
  854.         return 2;

libavcodec/utils.c:853:5: Switch condition is false. Skipping switch case
  851. int av_get_bits_per_sample(enum CodecID codec_id){
  852.     switch(codec_id){
  853.     case CODEC_ID_ADPCM_SBPRO_2:
           ^
  854.         return 2;
  855.     case CODEC_ID_ADPCM_SBPRO_3:

libavcodec/utils.c:855:5: Switch condition is false. Skipping switch case
  853.     case CODEC_ID_ADPCM_SBPRO_2:
  854.         return 2;
  855.     case CODEC_ID_ADPCM_SBPRO_3:
           ^
  856.         return 3;
  857.     case CODEC_ID_ADPCM_SBPRO_4:

libavcodec/utils.c:857:5: Switch condition is false. Skipping switch case
  855.     case CODEC_ID_ADPCM_SBPRO_3:
  856.         return 3;
  857.     case CODEC_ID_ADPCM_SBPRO_4:
           ^
  858.     case CODEC_ID_ADPCM_CT:
  859.         return 4;

libavcodec/utils.c:858:5: Switch condition is false. Skipping switch case
  856.         return 3;
  857.     case CODEC_ID_ADPCM_SBPRO_4:
  858.     case CODEC_ID_ADPCM_CT:
           ^
  859.         return 4;
  860.     case CODEC_ID_PCM_ALAW:

libavcodec/utils.c:860:5: Switch condition is false. Skipping switch case
  858.     case CODEC_ID_ADPCM_CT:
  859.         return 4;
  860.     case CODEC_ID_PCM_ALAW:
           ^
  861.     case CODEC_ID_PCM_MULAW:
  862.     case CODEC_ID_PCM_S8:

libavcodec/utils.c:861:5: Switch condition is false. Skipping switch case
  859.         return 4;
  860.     case CODEC_ID_PCM_ALAW:
  861.     case CODEC_ID_PCM_MULAW:
           ^
  862.     case CODEC_ID_PCM_S8:
  863.     case CODEC_ID_PCM_U8:

libavcodec/utils.c:862:5: Switch condition is false. Skipping switch case
  860.     case CODEC_ID_PCM_ALAW:
  861.     case CODEC_ID_PCM_MULAW:
  862.     case CODEC_ID_PCM_S8:
           ^
  863.     case CODEC_ID_PCM_U8:
  864.     case CODEC_ID_PCM_ZORK:

libavcodec/utils.c:863:5: Switch condition is false. Skipping switch case
  861.     case CODEC_ID_PCM_MULAW:
  862.     case CODEC_ID_PCM_S8:
  863.     case CODEC_ID_PCM_U8:
           ^
  864.     case CODEC_ID_PCM_ZORK:
  865.         return 8;

libavcodec/utils.c:864:5: Switch condition is false. Skipping switch case
  862.     case CODEC_ID_PCM_S8:
  863.     case CODEC_ID_PCM_U8:
  864.     case CODEC_ID_PCM_ZORK:
           ^
  865.         return 8;
  866.     case CODEC_ID_PCM_S16BE:

libavcodec/utils.c:866:5: Switch condition is false. Skipping switch case
  864.     case CODEC_ID_PCM_ZORK:
  865.         return 8;
  866.     case CODEC_ID_PCM_S16BE:
           ^
  867.     case CODEC_ID_PCM_S16LE:
  868.     case CODEC_ID_PCM_S16LE_PLANAR:

libavcodec/utils.c:867:5: Switch condition is false. Skipping switch case
  865.         return 8;
  866.     case CODEC_ID_PCM_S16BE:
  867.     case CODEC_ID_PCM_S16LE:
           ^
  868.     case CODEC_ID_PCM_S16LE_PLANAR:
  869.     case CODEC_ID_PCM_U16BE:

libavcodec/utils.c:868:5: Switch condition is false. Skipping switch case
  866.     case CODEC_ID_PCM_S16BE:
  867.     case CODEC_ID_PCM_S16LE:
  868.     case CODEC_ID_PCM_S16LE_PLANAR:
           ^
  869.     case CODEC_ID_PCM_U16BE:
  870.     case CODEC_ID_PCM_U16LE:

libavcodec/utils.c:869:5: Switch condition is false. Skipping switch case
  867.     case CODEC_ID_PCM_S16LE:
  868.     case CODEC_ID_PCM_S16LE_PLANAR:
  869.     case CODEC_ID_PCM_U16BE:
           ^
  870.     case CODEC_ID_PCM_U16LE:
  871.         return 16;

libavcodec/utils.c:870:5: Switch condition is false. Skipping switch case
  868.     case CODEC_ID_PCM_S16LE_PLANAR:
  869.     case CODEC_ID_PCM_U16BE:
  870.     case CODEC_ID_PCM_U16LE:
           ^
  871.         return 16;
  872.     case CODEC_ID_PCM_S24DAUD:

libavcodec/utils.c:872:5: Switch condition is false. Skipping switch case
  870.     case CODEC_ID_PCM_U16LE:
  871.         return 16;
  872.     case CODEC_ID_PCM_S24DAUD:
           ^
  873.     case CODEC_ID_PCM_S24BE:
  874.     case CODEC_ID_PCM_S24LE:

libavcodec/utils.c:873:5: Switch condition is false. Skipping switch case
  871.         return 16;
  872.     case CODEC_ID_PCM_S24DAUD:
  873.     case CODEC_ID_PCM_S24BE:
           ^
  874.     case CODEC_ID_PCM_S24LE:
  875.     case CODEC_ID_PCM_U24BE:

libavcodec/utils.c:874:5: Switch condition is false. Skipping switch case
  872.     case CODEC_ID_PCM_S24DAUD:
  873.     case CODEC_ID_PCM_S24BE:
  874.     case CODEC_ID_PCM_S24LE:
           ^
  875.     case CODEC_ID_PCM_U24BE:
  876.     case CODEC_ID_PCM_U24LE:

libavcodec/utils.c:875:5: Switch condition is false. Skipping switch case
  873.     case CODEC_ID_PCM_S24BE:
  874.     case CODEC_ID_PCM_S24LE:
  875.     case CODEC_ID_PCM_U24BE:
           ^
  876.     case CODEC_ID_PCM_U24LE:
  877.         return 24;

libavcodec/utils.c:876:5: Switch condition is false. Skipping switch case
  874.     case CODEC_ID_PCM_S24LE:
  875.     case CODEC_ID_PCM_U24BE:
  876.     case CODEC_ID_PCM_U24LE:
           ^
  877.         return 24;
  878.     case CODEC_ID_PCM_S32BE:

libavcodec/utils.c:878:5: Switch condition is false. Skipping switch case
  876.     case CODEC_ID_PCM_U24LE:
  877.         return 24;
  878.     case CODEC_ID_PCM_S32BE:
           ^
  879.     case CODEC_ID_PCM_S32LE:
  880.     case CODEC_ID_PCM_U32BE:

libavcodec/utils.c:879:5: Switch condition is false. Skipping switch case
  877.         return 24;
  878.     case CODEC_ID_PCM_S32BE:
  879.     case CODEC_ID_PCM_S32LE:
           ^
  880.     case CODEC_ID_PCM_U32BE:
  881.     case CODEC_ID_PCM_U32LE:

libavcodec/utils.c:880:5: Switch condition is false. Skipping switch case
  878.     case CODEC_ID_PCM_S32BE:
  879.     case CODEC_ID_PCM_S32LE:
  880.     case CODEC_ID_PCM_U32BE:
           ^
  881.     case CODEC_ID_PCM_U32LE:
  882.     case CODEC_ID_PCM_F32BE:

libavcodec/utils.c:881:5: Switch condition is false. Skipping switch case
  879.     case CODEC_ID_PCM_S32LE:
  880.     case CODEC_ID_PCM_U32BE:
  881.     case CODEC_ID_PCM_U32LE:
           ^
  882.     case CODEC_ID_PCM_F32BE:
  883.     case CODEC_ID_PCM_F32LE:

libavcodec/utils.c:882:5: Switch condition is false. Skipping switch case
  880.     case CODEC_ID_PCM_U32BE:
  881.     case CODEC_ID_PCM_U32LE:
  882.     case CODEC_ID_PCM_F32BE:
           ^
  883.     case CODEC_ID_PCM_F32LE:
  884.         return 32;

libavcodec/utils.c:883:5: Switch condition is false. Skipping switch case
  881.     case CODEC_ID_PCM_U32LE:
  882.     case CODEC_ID_PCM_F32BE:
  883.     case CODEC_ID_PCM_F32LE:
           ^
  884.         return 32;
  885.     case CODEC_ID_PCM_F64BE:

libavcodec/utils.c:885:5: Switch condition is false. Skipping switch case
  883.     case CODEC_ID_PCM_F32LE:
  884.         return 32;
  885.     case CODEC_ID_PCM_F64BE:
           ^
  886.     case CODEC_ID_PCM_F64LE:
  887.         return 64;

libavcodec/utils.c:886:5: Switch condition is false. Skipping switch case
  884.         return 32;
  885.     case CODEC_ID_PCM_F64BE:
  886.     case CODEC_ID_PCM_F64LE:
           ^
  887.         return 64;
  888.     default:

libavcodec/utils.c:889:9: 
  887.         return 64;
  888.     default:
  889.         return 0;
               ^
  890.     }
  891. }

libavcodec/utils.c:891:1: return from a call to av_get_bits_per_sample
  889.         return 0;
  890.     }
  891. }
       ^
  892. 
  893. int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {

libavcodec/pcm.c:122:5: 
120. 
121.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
122.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
         ^
123.     avctx->coded_frame= avcodec_alloc_frame();
124.     avctx->coded_frame->key_frame= 1;

libavcodec/pcm.c:123:5: 
121.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
122.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
123.     avctx->coded_frame= avcodec_alloc_frame();
         ^
124.     avctx->coded_frame->key_frame= 1;
125. 

libavcodec/utils.c:393:1: start of procedure avcodec_alloc_frame()
  391. }
  392. 
  393. AVFrame *avcodec_alloc_frame(void){
       ^
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 

libavcodec/utils.c:394:5: 
  392. 
  393. AVFrame *avcodec_alloc_frame(void){
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  395. 
  396.     if(pic==NULL) return NULL;

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

libavutil/mem.c:45:5: 
    43. void *av_malloc(unsigned int size)
    44. {
    45.     void *ptr = NULL;
            ^
    46. #ifdef CONFIG_MEMALIGN_HACK
    47.     long diff;

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

libavutil/mem.c:62:5: Skipping posix_memalign(): method has no implementation
    60.     ((char*)ptr)[-1]= diff;
    61. #elif defined (HAVE_POSIX_MEMALIGN)
    62.     posix_memalign(&ptr,16,size);
            ^
    63. #elif defined (HAVE_MEMALIGN)
    64.     ptr = memalign(16,size);

libavutil/mem.c:94:5: 
    92.     ptr = malloc(size);
    93. #endif
    94.     return ptr;
            ^
    95. }
    96. 

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

libavcodec/utils.c:396:8: Taking true branch
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 
  396.     if(pic==NULL) return NULL;
              ^
  397. 
  398.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:396:19: 
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 
  396.     if(pic==NULL) return NULL;
                         ^
  397. 
  398.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:401:1: return from a call to avcodec_alloc_frame
  399. 
  400.     return pic;
  401. }
       ^
  402. 
  403. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/pcm.c:124:5: 
122.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
123.     avctx->coded_frame= avcodec_alloc_frame();
124.     avctx->coded_frame->key_frame= 1;
         ^
125. 
126.     return 0;
