libavcodec/pcm.c:126: error: Null Dereference
  pointer `avctx->coded_frame` last assigned on line 125 could be null and is dereferenced at line 126, 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.     if (avctx->codec->id==CODEC_ID_PCM_F32BE && avctx->sample_fmt!=SAMPLE_FMT_FLT) {
111.         return -1;

libavcodec/pcm.c:110:9: Taking false branch
108. {
109.     avctx->frame_size = 1;
110.     if (avctx->codec->id==CODEC_ID_PCM_F32BE && avctx->sample_fmt!=SAMPLE_FMT_FLT) {
             ^
111.         return -1;
112.     }

libavcodec/pcm.c:113:5: 
111.         return -1;
112.     }
113.     switch(avctx->codec->id) {
         ^
114.     case CODEC_ID_PCM_ALAW:
115.         build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);

libavcodec/pcm.c:114:5: Switch condition is false. Skipping switch case
112.     }
113.     switch(avctx->codec->id) {
114.     case CODEC_ID_PCM_ALAW:
         ^
115.         build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);
116.         break;

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

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

libavcodec/utils.c:1281:1: start of procedure av_get_bits_per_sample()
  1279. }
  1280. 
  1281. int av_get_bits_per_sample(enum CodecID codec_id){
        ^
  1282.     switch(codec_id){
  1283.     case CODEC_ID_ADPCM_SBPRO_2:

libavcodec/utils.c:1282:5: 
  1280. 
  1281. int av_get_bits_per_sample(enum CodecID codec_id){
  1282.     switch(codec_id){
            ^
  1283.     case CODEC_ID_ADPCM_SBPRO_2:
  1284.         return 2;

libavcodec/utils.c:1283:5: Switch condition is false. Skipping switch case
  1281. int av_get_bits_per_sample(enum CodecID codec_id){
  1282.     switch(codec_id){
  1283.     case CODEC_ID_ADPCM_SBPRO_2:
            ^
  1284.         return 2;
  1285.     case CODEC_ID_ADPCM_SBPRO_3:

libavcodec/utils.c:1285:5: Switch condition is false. Skipping switch case
  1283.     case CODEC_ID_ADPCM_SBPRO_2:
  1284.         return 2;
  1285.     case CODEC_ID_ADPCM_SBPRO_3:
            ^
  1286.         return 3;
  1287.     case CODEC_ID_ADPCM_SBPRO_4:

libavcodec/utils.c:1287:5: Switch condition is false. Skipping switch case
  1285.     case CODEC_ID_ADPCM_SBPRO_3:
  1286.         return 3;
  1287.     case CODEC_ID_ADPCM_SBPRO_4:
            ^
  1288.     case CODEC_ID_ADPCM_CT:
  1289.         return 4;

libavcodec/utils.c:1288:5: Switch condition is false. Skipping switch case
  1286.         return 3;
  1287.     case CODEC_ID_ADPCM_SBPRO_4:
  1288.     case CODEC_ID_ADPCM_CT:
            ^
  1289.         return 4;
  1290.     case CODEC_ID_PCM_ALAW:

libavcodec/utils.c:1290:5: Switch condition is false. Skipping switch case
  1288.     case CODEC_ID_ADPCM_CT:
  1289.         return 4;
  1290.     case CODEC_ID_PCM_ALAW:
            ^
  1291.     case CODEC_ID_PCM_MULAW:
  1292.     case CODEC_ID_PCM_S8:

libavcodec/utils.c:1291:5: Switch condition is false. Skipping switch case
  1289.         return 4;
  1290.     case CODEC_ID_PCM_ALAW:
  1291.     case CODEC_ID_PCM_MULAW:
            ^
  1292.     case CODEC_ID_PCM_S8:
  1293.     case CODEC_ID_PCM_U8:

libavcodec/utils.c:1292:5: Switch condition is false. Skipping switch case
  1290.     case CODEC_ID_PCM_ALAW:
  1291.     case CODEC_ID_PCM_MULAW:
  1292.     case CODEC_ID_PCM_S8:
            ^
  1293.     case CODEC_ID_PCM_U8:
  1294.     case CODEC_ID_PCM_ZORK:

libavcodec/utils.c:1293:5: Switch condition is false. Skipping switch case
  1291.     case CODEC_ID_PCM_MULAW:
  1292.     case CODEC_ID_PCM_S8:
  1293.     case CODEC_ID_PCM_U8:
            ^
  1294.     case CODEC_ID_PCM_ZORK:
  1295.         return 8;

libavcodec/utils.c:1294:5: Switch condition is false. Skipping switch case
  1292.     case CODEC_ID_PCM_S8:
  1293.     case CODEC_ID_PCM_U8:
  1294.     case CODEC_ID_PCM_ZORK:
            ^
  1295.         return 8;
  1296.     case CODEC_ID_PCM_S16BE:

libavcodec/utils.c:1296:5: Switch condition is false. Skipping switch case
  1294.     case CODEC_ID_PCM_ZORK:
  1295.         return 8;
  1296.     case CODEC_ID_PCM_S16BE:
            ^
  1297.     case CODEC_ID_PCM_S16LE:
  1298.     case CODEC_ID_PCM_S16LE_PLANAR:

libavcodec/utils.c:1297:5: Switch condition is false. Skipping switch case
  1295.         return 8;
  1296.     case CODEC_ID_PCM_S16BE:
  1297.     case CODEC_ID_PCM_S16LE:
            ^
  1298.     case CODEC_ID_PCM_S16LE_PLANAR:
  1299.     case CODEC_ID_PCM_U16BE:

libavcodec/utils.c:1298:5: Switch condition is false. Skipping switch case
  1296.     case CODEC_ID_PCM_S16BE:
  1297.     case CODEC_ID_PCM_S16LE:
  1298.     case CODEC_ID_PCM_S16LE_PLANAR:
            ^
  1299.     case CODEC_ID_PCM_U16BE:
  1300.     case CODEC_ID_PCM_U16LE:

libavcodec/utils.c:1299:5: Switch condition is false. Skipping switch case
  1297.     case CODEC_ID_PCM_S16LE:
  1298.     case CODEC_ID_PCM_S16LE_PLANAR:
  1299.     case CODEC_ID_PCM_U16BE:
            ^
  1300.     case CODEC_ID_PCM_U16LE:
  1301.         return 16;

libavcodec/utils.c:1300:5: Switch condition is false. Skipping switch case
  1298.     case CODEC_ID_PCM_S16LE_PLANAR:
  1299.     case CODEC_ID_PCM_U16BE:
  1300.     case CODEC_ID_PCM_U16LE:
            ^
  1301.         return 16;
  1302.     case CODEC_ID_PCM_S24DAUD:

libavcodec/utils.c:1302:5: Switch condition is false. Skipping switch case
  1300.     case CODEC_ID_PCM_U16LE:
  1301.         return 16;
  1302.     case CODEC_ID_PCM_S24DAUD:
            ^
  1303.     case CODEC_ID_PCM_S24BE:
  1304.     case CODEC_ID_PCM_S24LE:

libavcodec/utils.c:1303:5: Switch condition is false. Skipping switch case
  1301.         return 16;
  1302.     case CODEC_ID_PCM_S24DAUD:
  1303.     case CODEC_ID_PCM_S24BE:
            ^
  1304.     case CODEC_ID_PCM_S24LE:
  1305.     case CODEC_ID_PCM_U24BE:

libavcodec/utils.c:1304:5: Switch condition is false. Skipping switch case
  1302.     case CODEC_ID_PCM_S24DAUD:
  1303.     case CODEC_ID_PCM_S24BE:
  1304.     case CODEC_ID_PCM_S24LE:
            ^
  1305.     case CODEC_ID_PCM_U24BE:
  1306.     case CODEC_ID_PCM_U24LE:

libavcodec/utils.c:1305:5: Switch condition is false. Skipping switch case
  1303.     case CODEC_ID_PCM_S24BE:
  1304.     case CODEC_ID_PCM_S24LE:
  1305.     case CODEC_ID_PCM_U24BE:
            ^
  1306.     case CODEC_ID_PCM_U24LE:
  1307.         return 24;

libavcodec/utils.c:1306:5: Switch condition is false. Skipping switch case
  1304.     case CODEC_ID_PCM_S24LE:
  1305.     case CODEC_ID_PCM_U24BE:
  1306.     case CODEC_ID_PCM_U24LE:
            ^
  1307.         return 24;
  1308.     case CODEC_ID_PCM_S32BE:

libavcodec/utils.c:1308:5: Switch condition is false. Skipping switch case
  1306.     case CODEC_ID_PCM_U24LE:
  1307.         return 24;
  1308.     case CODEC_ID_PCM_S32BE:
            ^
  1309.     case CODEC_ID_PCM_S32LE:
  1310.     case CODEC_ID_PCM_U32BE:

libavcodec/utils.c:1309:5: Switch condition is false. Skipping switch case
  1307.         return 24;
  1308.     case CODEC_ID_PCM_S32BE:
  1309.     case CODEC_ID_PCM_S32LE:
            ^
  1310.     case CODEC_ID_PCM_U32BE:
  1311.     case CODEC_ID_PCM_U32LE:

libavcodec/utils.c:1310:5: Switch condition is false. Skipping switch case
  1308.     case CODEC_ID_PCM_S32BE:
  1309.     case CODEC_ID_PCM_S32LE:
  1310.     case CODEC_ID_PCM_U32BE:
            ^
  1311.     case CODEC_ID_PCM_U32LE:
  1312.     case CODEC_ID_PCM_F32BE:

libavcodec/utils.c:1311:5: Switch condition is false. Skipping switch case
  1309.     case CODEC_ID_PCM_S32LE:
  1310.     case CODEC_ID_PCM_U32BE:
  1311.     case CODEC_ID_PCM_U32LE:
            ^
  1312.     case CODEC_ID_PCM_F32BE:
  1313.         return 32;

libavcodec/utils.c:1312:5: Switch condition is false. Skipping switch case
  1310.     case CODEC_ID_PCM_U32BE:
  1311.     case CODEC_ID_PCM_U32LE:
  1312.     case CODEC_ID_PCM_F32BE:
            ^
  1313.         return 32;
  1314.     default:

libavcodec/utils.c:1315:9: 
  1313.         return 32;
  1314.     default:
  1315.         return 0;
                ^
  1316.     }
  1317. }

libavcodec/utils.c:1317:1: return from a call to av_get_bits_per_sample
  1315.         return 0;
  1316.     }
  1317. }
        ^
  1318. 
  1319. int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {

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

libavcodec/utils.c:800:1: start of procedure avcodec_alloc_frame()
  798. }
  799. 
  800. AVFrame *avcodec_alloc_frame(void){
       ^
  801.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  802. 

libavcodec/utils.c:801:5: 
  799. 
  800. AVFrame *avcodec_alloc_frame(void){
  801.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  802. 
  803.     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:803:8: Taking true branch
  801.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  802. 
  803.     if(pic==NULL) return NULL;
              ^
  804. 
  805.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:803:19: 
  801.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  802. 
  803.     if(pic==NULL) return NULL;
                         ^
  804. 
  805.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:808:1: return from a call to avcodec_alloc_frame
  806. 
  807.     return pic;
  808. }
       ^
  809. 
  810. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/pcm.c:126:5: 
124.     avctx->block_align = avctx->channels * av_get_bits_per_sample(avctx->codec->id)/8;
125.     avctx->coded_frame= avcodec_alloc_frame();
126.     avctx->coded_frame->key_frame= 1;
         ^
127. 
128.     return 0;
