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

libavcodec/utils.c:1295:1: start of procedure av_get_bits_per_sample()
  1293. }
  1294. 
  1295. int av_get_bits_per_sample(enum CodecID codec_id){
        ^
  1296.     switch(codec_id){
  1297.     case CODEC_ID_ADPCM_SBPRO_2:

libavcodec/utils.c:1296:5: 
  1294. 
  1295. int av_get_bits_per_sample(enum CodecID codec_id){
  1296.     switch(codec_id){
            ^
  1297.     case CODEC_ID_ADPCM_SBPRO_2:
  1298.         return 2;

libavcodec/utils.c:1297:5: Switch condition is false. Skipping switch case
  1295. int av_get_bits_per_sample(enum CodecID codec_id){
  1296.     switch(codec_id){
  1297.     case CODEC_ID_ADPCM_SBPRO_2:
            ^
  1298.         return 2;
  1299.     case CODEC_ID_ADPCM_SBPRO_3:

libavcodec/utils.c:1299:5: Switch condition is false. Skipping switch case
  1297.     case CODEC_ID_ADPCM_SBPRO_2:
  1298.         return 2;
  1299.     case CODEC_ID_ADPCM_SBPRO_3:
            ^
  1300.         return 3;
  1301.     case CODEC_ID_ADPCM_SBPRO_4:

libavcodec/utils.c:1301:5: Switch condition is false. Skipping switch case
  1299.     case CODEC_ID_ADPCM_SBPRO_3:
  1300.         return 3;
  1301.     case CODEC_ID_ADPCM_SBPRO_4:
            ^
  1302.     case CODEC_ID_ADPCM_CT:
  1303.         return 4;

libavcodec/utils.c:1302:5: Switch condition is false. Skipping switch case
  1300.         return 3;
  1301.     case CODEC_ID_ADPCM_SBPRO_4:
  1302.     case CODEC_ID_ADPCM_CT:
            ^
  1303.         return 4;
  1304.     case CODEC_ID_PCM_ALAW:

libavcodec/utils.c:1304:5: Switch condition is false. Skipping switch case
  1302.     case CODEC_ID_ADPCM_CT:
  1303.         return 4;
  1304.     case CODEC_ID_PCM_ALAW:
            ^
  1305.     case CODEC_ID_PCM_MULAW:
  1306.     case CODEC_ID_PCM_S8:

libavcodec/utils.c:1305:5: Switch condition is false. Skipping switch case
  1303.         return 4;
  1304.     case CODEC_ID_PCM_ALAW:
  1305.     case CODEC_ID_PCM_MULAW:
            ^
  1306.     case CODEC_ID_PCM_S8:
  1307.     case CODEC_ID_PCM_U8:

libavcodec/utils.c:1306:5: Switch condition is false. Skipping switch case
  1304.     case CODEC_ID_PCM_ALAW:
  1305.     case CODEC_ID_PCM_MULAW:
  1306.     case CODEC_ID_PCM_S8:
            ^
  1307.     case CODEC_ID_PCM_U8:
  1308.     case CODEC_ID_PCM_ZORK:

libavcodec/utils.c:1307:5: Switch condition is false. Skipping switch case
  1305.     case CODEC_ID_PCM_MULAW:
  1306.     case CODEC_ID_PCM_S8:
  1307.     case CODEC_ID_PCM_U8:
            ^
  1308.     case CODEC_ID_PCM_ZORK:
  1309.         return 8;

libavcodec/utils.c:1308:5: Switch condition is false. Skipping switch case
  1306.     case CODEC_ID_PCM_S8:
  1307.     case CODEC_ID_PCM_U8:
  1308.     case CODEC_ID_PCM_ZORK:
            ^
  1309.         return 8;
  1310.     case CODEC_ID_PCM_S16BE:

libavcodec/utils.c:1310:5: Switch condition is false. Skipping switch case
  1308.     case CODEC_ID_PCM_ZORK:
  1309.         return 8;
  1310.     case CODEC_ID_PCM_S16BE:
            ^
  1311.     case CODEC_ID_PCM_S16LE:
  1312.     case CODEC_ID_PCM_S16LE_PLANAR:

libavcodec/utils.c:1311:5: Switch condition is false. Skipping switch case
  1309.         return 8;
  1310.     case CODEC_ID_PCM_S16BE:
  1311.     case CODEC_ID_PCM_S16LE:
            ^
  1312.     case CODEC_ID_PCM_S16LE_PLANAR:
  1313.     case CODEC_ID_PCM_U16BE:

libavcodec/utils.c:1312:5: Switch condition is false. Skipping switch case
  1310.     case CODEC_ID_PCM_S16BE:
  1311.     case CODEC_ID_PCM_S16LE:
  1312.     case CODEC_ID_PCM_S16LE_PLANAR:
            ^
  1313.     case CODEC_ID_PCM_U16BE:
  1314.     case CODEC_ID_PCM_U16LE:

libavcodec/utils.c:1313:5: Switch condition is false. Skipping switch case
  1311.     case CODEC_ID_PCM_S16LE:
  1312.     case CODEC_ID_PCM_S16LE_PLANAR:
  1313.     case CODEC_ID_PCM_U16BE:
            ^
  1314.     case CODEC_ID_PCM_U16LE:
  1315.         return 16;

libavcodec/utils.c:1314:5: Switch condition is false. Skipping switch case
  1312.     case CODEC_ID_PCM_S16LE_PLANAR:
  1313.     case CODEC_ID_PCM_U16BE:
  1314.     case CODEC_ID_PCM_U16LE:
            ^
  1315.         return 16;
  1316.     case CODEC_ID_PCM_S24DAUD:

libavcodec/utils.c:1316:5: Switch condition is false. Skipping switch case
  1314.     case CODEC_ID_PCM_U16LE:
  1315.         return 16;
  1316.     case CODEC_ID_PCM_S24DAUD:
            ^
  1317.     case CODEC_ID_PCM_S24BE:
  1318.     case CODEC_ID_PCM_S24LE:

libavcodec/utils.c:1317:5: Switch condition is false. Skipping switch case
  1315.         return 16;
  1316.     case CODEC_ID_PCM_S24DAUD:
  1317.     case CODEC_ID_PCM_S24BE:
            ^
  1318.     case CODEC_ID_PCM_S24LE:
  1319.     case CODEC_ID_PCM_U24BE:

libavcodec/utils.c:1318:5: Switch condition is false. Skipping switch case
  1316.     case CODEC_ID_PCM_S24DAUD:
  1317.     case CODEC_ID_PCM_S24BE:
  1318.     case CODEC_ID_PCM_S24LE:
            ^
  1319.     case CODEC_ID_PCM_U24BE:
  1320.     case CODEC_ID_PCM_U24LE:

libavcodec/utils.c:1319:5: Switch condition is false. Skipping switch case
  1317.     case CODEC_ID_PCM_S24BE:
  1318.     case CODEC_ID_PCM_S24LE:
  1319.     case CODEC_ID_PCM_U24BE:
            ^
  1320.     case CODEC_ID_PCM_U24LE:
  1321.         return 24;

libavcodec/utils.c:1320:5: Switch condition is false. Skipping switch case
  1318.     case CODEC_ID_PCM_S24LE:
  1319.     case CODEC_ID_PCM_U24BE:
  1320.     case CODEC_ID_PCM_U24LE:
            ^
  1321.         return 24;
  1322.     case CODEC_ID_PCM_S32BE:

libavcodec/utils.c:1322:5: Switch condition is false. Skipping switch case
  1320.     case CODEC_ID_PCM_U24LE:
  1321.         return 24;
  1322.     case CODEC_ID_PCM_S32BE:
            ^
  1323.     case CODEC_ID_PCM_S32LE:
  1324.     case CODEC_ID_PCM_U32BE:

libavcodec/utils.c:1323:5: Switch condition is false. Skipping switch case
  1321.         return 24;
  1322.     case CODEC_ID_PCM_S32BE:
  1323.     case CODEC_ID_PCM_S32LE:
            ^
  1324.     case CODEC_ID_PCM_U32BE:
  1325.     case CODEC_ID_PCM_U32LE:

libavcodec/utils.c:1324:5: Switch condition is false. Skipping switch case
  1322.     case CODEC_ID_PCM_S32BE:
  1323.     case CODEC_ID_PCM_S32LE:
  1324.     case CODEC_ID_PCM_U32BE:
            ^
  1325.     case CODEC_ID_PCM_U32LE:
  1326.     case CODEC_ID_PCM_F32BE:

libavcodec/utils.c:1325:5: Switch condition is false. Skipping switch case
  1323.     case CODEC_ID_PCM_S32LE:
  1324.     case CODEC_ID_PCM_U32BE:
  1325.     case CODEC_ID_PCM_U32LE:
            ^
  1326.     case CODEC_ID_PCM_F32BE:
  1327.     case CODEC_ID_PCM_F32LE:

libavcodec/utils.c:1326:5: Switch condition is false. Skipping switch case
  1324.     case CODEC_ID_PCM_U32BE:
  1325.     case CODEC_ID_PCM_U32LE:
  1326.     case CODEC_ID_PCM_F32BE:
            ^
  1327.     case CODEC_ID_PCM_F32LE:
  1328.         return 32;

libavcodec/utils.c:1327:5: Switch condition is false. Skipping switch case
  1325.     case CODEC_ID_PCM_U32LE:
  1326.     case CODEC_ID_PCM_F32BE:
  1327.     case CODEC_ID_PCM_F32LE:
            ^
  1328.         return 32;
  1329.     case CODEC_ID_PCM_F64BE:

libavcodec/utils.c:1329:5: Switch condition is false. Skipping switch case
  1327.     case CODEC_ID_PCM_F32LE:
  1328.         return 32;
  1329.     case CODEC_ID_PCM_F64BE:
            ^
  1330.     case CODEC_ID_PCM_F64LE:
  1331.         return 64;

libavcodec/utils.c:1330:5: Switch condition is false. Skipping switch case
  1328.         return 32;
  1329.     case CODEC_ID_PCM_F64BE:
  1330.     case CODEC_ID_PCM_F64LE:
            ^
  1331.         return 64;
  1332.     default:

libavcodec/utils.c:1333:9: 
  1331.         return 64;
  1332.     default:
  1333.         return 0;
                ^
  1334.     }
  1335. }

libavcodec/utils.c:1335:1: return from a call to av_get_bits_per_sample
  1333.         return 0;
  1334.     }
  1335. }
        ^
  1336. 
  1337. int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {

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

libavcodec/utils.c:810:1: start of procedure avcodec_alloc_frame()
  808. }
  809. 
  810. AVFrame *avcodec_alloc_frame(void){
       ^
  811.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  812. 

libavcodec/utils.c:811:5: 
  809. 
  810. AVFrame *avcodec_alloc_frame(void){
  811.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  812. 
  813.     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:813:8: Taking true branch
  811.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  812. 
  813.     if(pic==NULL) return NULL;
              ^
  814. 
  815.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:813:19: 
  811.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  812. 
  813.     if(pic==NULL) return NULL;
                         ^
  814. 
  815.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:818:1: return from a call to avcodec_alloc_frame
  816. 
  817.     return pic;
  818. }
       ^
  819. 
  820. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

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