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:863:1: start of procedure av_get_bits_per_sample()
  861. }
  862. 
  863. int av_get_bits_per_sample(enum CodecID codec_id){
       ^
  864.     switch(codec_id){
  865.     case CODEC_ID_ADPCM_SBPRO_2:

libavcodec/utils.c:864:5: 
  862. 
  863. int av_get_bits_per_sample(enum CodecID codec_id){
  864.     switch(codec_id){
           ^
  865.     case CODEC_ID_ADPCM_SBPRO_2:
  866.         return 2;

libavcodec/utils.c:865:5: Switch condition is false. Skipping switch case
  863. int av_get_bits_per_sample(enum CodecID codec_id){
  864.     switch(codec_id){
  865.     case CODEC_ID_ADPCM_SBPRO_2:
           ^
  866.         return 2;
  867.     case CODEC_ID_ADPCM_SBPRO_3:

libavcodec/utils.c:867:5: Switch condition is false. Skipping switch case
  865.     case CODEC_ID_ADPCM_SBPRO_2:
  866.         return 2;
  867.     case CODEC_ID_ADPCM_SBPRO_3:
           ^
  868.         return 3;
  869.     case CODEC_ID_ADPCM_SBPRO_4:

libavcodec/utils.c:869:5: Switch condition is false. Skipping switch case
  867.     case CODEC_ID_ADPCM_SBPRO_3:
  868.         return 3;
  869.     case CODEC_ID_ADPCM_SBPRO_4:
           ^
  870.     case CODEC_ID_ADPCM_CT:
  871.         return 4;

libavcodec/utils.c:870:5: Switch condition is false. Skipping switch case
  868.         return 3;
  869.     case CODEC_ID_ADPCM_SBPRO_4:
  870.     case CODEC_ID_ADPCM_CT:
           ^
  871.         return 4;
  872.     case CODEC_ID_PCM_ALAW:

libavcodec/utils.c:872:5: Switch condition is false. Skipping switch case
  870.     case CODEC_ID_ADPCM_CT:
  871.         return 4;
  872.     case CODEC_ID_PCM_ALAW:
           ^
  873.     case CODEC_ID_PCM_MULAW:
  874.     case CODEC_ID_PCM_S8:

libavcodec/utils.c:873:5: Switch condition is false. Skipping switch case
  871.         return 4;
  872.     case CODEC_ID_PCM_ALAW:
  873.     case CODEC_ID_PCM_MULAW:
           ^
  874.     case CODEC_ID_PCM_S8:
  875.     case CODEC_ID_PCM_U8:

libavcodec/utils.c:874:5: Switch condition is false. Skipping switch case
  872.     case CODEC_ID_PCM_ALAW:
  873.     case CODEC_ID_PCM_MULAW:
  874.     case CODEC_ID_PCM_S8:
           ^
  875.     case CODEC_ID_PCM_U8:
  876.     case CODEC_ID_PCM_ZORK:

libavcodec/utils.c:875:5: Switch condition is false. Skipping switch case
  873.     case CODEC_ID_PCM_MULAW:
  874.     case CODEC_ID_PCM_S8:
  875.     case CODEC_ID_PCM_U8:
           ^
  876.     case CODEC_ID_PCM_ZORK:
  877.         return 8;

libavcodec/utils.c:876:5: Switch condition is false. Skipping switch case
  874.     case CODEC_ID_PCM_S8:
  875.     case CODEC_ID_PCM_U8:
  876.     case CODEC_ID_PCM_ZORK:
           ^
  877.         return 8;
  878.     case CODEC_ID_PCM_S16BE:

libavcodec/utils.c:878:5: Switch condition is false. Skipping switch case
  876.     case CODEC_ID_PCM_ZORK:
  877.         return 8;
  878.     case CODEC_ID_PCM_S16BE:
           ^
  879.     case CODEC_ID_PCM_S16LE:
  880.     case CODEC_ID_PCM_S16LE_PLANAR:

libavcodec/utils.c:879:5: Switch condition is false. Skipping switch case
  877.         return 8;
  878.     case CODEC_ID_PCM_S16BE:
  879.     case CODEC_ID_PCM_S16LE:
           ^
  880.     case CODEC_ID_PCM_S16LE_PLANAR:
  881.     case CODEC_ID_PCM_U16BE:

libavcodec/utils.c:880:5: Switch condition is false. Skipping switch case
  878.     case CODEC_ID_PCM_S16BE:
  879.     case CODEC_ID_PCM_S16LE:
  880.     case CODEC_ID_PCM_S16LE_PLANAR:
           ^
  881.     case CODEC_ID_PCM_U16BE:
  882.     case CODEC_ID_PCM_U16LE:

libavcodec/utils.c:881:5: Switch condition is false. Skipping switch case
  879.     case CODEC_ID_PCM_S16LE:
  880.     case CODEC_ID_PCM_S16LE_PLANAR:
  881.     case CODEC_ID_PCM_U16BE:
           ^
  882.     case CODEC_ID_PCM_U16LE:
  883.         return 16;

libavcodec/utils.c:882:5: Switch condition is false. Skipping switch case
  880.     case CODEC_ID_PCM_S16LE_PLANAR:
  881.     case CODEC_ID_PCM_U16BE:
  882.     case CODEC_ID_PCM_U16LE:
           ^
  883.         return 16;
  884.     case CODEC_ID_PCM_S24DAUD:

libavcodec/utils.c:884:5: Switch condition is false. Skipping switch case
  882.     case CODEC_ID_PCM_U16LE:
  883.         return 16;
  884.     case CODEC_ID_PCM_S24DAUD:
           ^
  885.     case CODEC_ID_PCM_S24BE:
  886.     case CODEC_ID_PCM_S24LE:

libavcodec/utils.c:885:5: Switch condition is false. Skipping switch case
  883.         return 16;
  884.     case CODEC_ID_PCM_S24DAUD:
  885.     case CODEC_ID_PCM_S24BE:
           ^
  886.     case CODEC_ID_PCM_S24LE:
  887.     case CODEC_ID_PCM_U24BE:

libavcodec/utils.c:886:5: Switch condition is false. Skipping switch case
  884.     case CODEC_ID_PCM_S24DAUD:
  885.     case CODEC_ID_PCM_S24BE:
  886.     case CODEC_ID_PCM_S24LE:
           ^
  887.     case CODEC_ID_PCM_U24BE:
  888.     case CODEC_ID_PCM_U24LE:

libavcodec/utils.c:887:5: Switch condition is false. Skipping switch case
  885.     case CODEC_ID_PCM_S24BE:
  886.     case CODEC_ID_PCM_S24LE:
  887.     case CODEC_ID_PCM_U24BE:
           ^
  888.     case CODEC_ID_PCM_U24LE:
  889.         return 24;

libavcodec/utils.c:888:5: Switch condition is false. Skipping switch case
  886.     case CODEC_ID_PCM_S24LE:
  887.     case CODEC_ID_PCM_U24BE:
  888.     case CODEC_ID_PCM_U24LE:
           ^
  889.         return 24;
  890.     case CODEC_ID_PCM_S32BE:

libavcodec/utils.c:890:5: Switch condition is false. Skipping switch case
  888.     case CODEC_ID_PCM_U24LE:
  889.         return 24;
  890.     case CODEC_ID_PCM_S32BE:
           ^
  891.     case CODEC_ID_PCM_S32LE:
  892.     case CODEC_ID_PCM_U32BE:

libavcodec/utils.c:891:5: Switch condition is false. Skipping switch case
  889.         return 24;
  890.     case CODEC_ID_PCM_S32BE:
  891.     case CODEC_ID_PCM_S32LE:
           ^
  892.     case CODEC_ID_PCM_U32BE:
  893.     case CODEC_ID_PCM_U32LE:

libavcodec/utils.c:892:5: Switch condition is false. Skipping switch case
  890.     case CODEC_ID_PCM_S32BE:
  891.     case CODEC_ID_PCM_S32LE:
  892.     case CODEC_ID_PCM_U32BE:
           ^
  893.     case CODEC_ID_PCM_U32LE:
  894.     case CODEC_ID_PCM_F32BE:

libavcodec/utils.c:893:5: Switch condition is false. Skipping switch case
  891.     case CODEC_ID_PCM_S32LE:
  892.     case CODEC_ID_PCM_U32BE:
  893.     case CODEC_ID_PCM_U32LE:
           ^
  894.     case CODEC_ID_PCM_F32BE:
  895.     case CODEC_ID_PCM_F32LE:

libavcodec/utils.c:894:5: Switch condition is false. Skipping switch case
  892.     case CODEC_ID_PCM_U32BE:
  893.     case CODEC_ID_PCM_U32LE:
  894.     case CODEC_ID_PCM_F32BE:
           ^
  895.     case CODEC_ID_PCM_F32LE:
  896.         return 32;

libavcodec/utils.c:895:5: Switch condition is false. Skipping switch case
  893.     case CODEC_ID_PCM_U32LE:
  894.     case CODEC_ID_PCM_F32BE:
  895.     case CODEC_ID_PCM_F32LE:
           ^
  896.         return 32;
  897.     case CODEC_ID_PCM_F64BE:

libavcodec/utils.c:897:5: Switch condition is false. Skipping switch case
  895.     case CODEC_ID_PCM_F32LE:
  896.         return 32;
  897.     case CODEC_ID_PCM_F64BE:
           ^
  898.     case CODEC_ID_PCM_F64LE:
  899.         return 64;

libavcodec/utils.c:898:5: Switch condition is false. Skipping switch case
  896.         return 32;
  897.     case CODEC_ID_PCM_F64BE:
  898.     case CODEC_ID_PCM_F64LE:
           ^
  899.         return 64;
  900.     default:

libavcodec/utils.c:901:9: 
  899.         return 64;
  900.     default:
  901.         return 0;
               ^
  902.     }
  903. }

libavcodec/utils.c:903:1: return from a call to av_get_bits_per_sample
  901.         return 0;
  902.     }
  903. }
       ^
  904. 
  905. 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:405:1: start of procedure avcodec_alloc_frame()
  403. }
  404. 
  405. AVFrame *avcodec_alloc_frame(void){
       ^
  406.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  407. 

libavcodec/utils.c:406:5: 
  404. 
  405. AVFrame *avcodec_alloc_frame(void){
  406.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  407. 
  408.     if(pic==NULL) return NULL;

libavutil/mem.c:47:1: start of procedure av_malloc()
    45.    linker will do it automatically. */
    46. 
    47. void *av_malloc(unsigned int size)
        ^
    48. {
    49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
    47. void *av_malloc(unsigned int size)
    48. {
    49.     void *ptr = NULL;
            ^
    50. #if CONFIG_MEMALIGN_HACK
    51.     long diff;

libavutil/mem.c:55:8: Taking false branch
    53. 
    54.     /* let's disallow possible ambiguous cases */
    55.     if(size > (INT_MAX-16) )
               ^
    56.         return NULL;
    57. 

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

libavutil/mem.c:98:5: 
     96.     ptr = malloc(size);
     97. #endif
     98.     return ptr;
             ^
     99. }
    100. 

libavutil/mem.c:99:1: return from a call to av_malloc
     97. #endif
     98.     return ptr;
     99. }
         ^
    100. 
    101. void *av_realloc(void *ptr, unsigned int size)

libavcodec/utils.c:408:8: Taking true branch
  406.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  407. 
  408.     if(pic==NULL) return NULL;
              ^
  409. 
  410.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:408:19: 
  406.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  407. 
  408.     if(pic==NULL) return NULL;
                         ^
  409. 
  410.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:413:1: return from a call to avcodec_alloc_frame
  411. 
  412.     return pic;
  413. }
       ^
  414. 
  415. 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;
