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

libavcodec/pcm.c:35:1: start of procedure pcm_encode_init()
33. #define MAX_CHANNELS 64
34. 
35. static av_cold int pcm_encode_init(AVCodecContext *avctx)
    ^
36. {
37.     avctx->frame_size = 0;

libavcodec/pcm.c:37:5: 
35. static av_cold int pcm_encode_init(AVCodecContext *avctx)
36. {
37.     avctx->frame_size = 0;
        ^
38.     switch(avctx->codec->id) {
39.     case CODEC_ID_PCM_ALAW:

libavcodec/pcm.c:38:5: 
36. {
37.     avctx->frame_size = 0;
38.     switch(avctx->codec->id) {
        ^
39.     case CODEC_ID_PCM_ALAW:
40.         pcm_alaw_tableinit();

libavcodec/pcm.c:39:5: Switch condition is false. Skipping switch case
37.     avctx->frame_size = 0;
38.     switch(avctx->codec->id) {
39.     case CODEC_ID_PCM_ALAW:
        ^
40.         pcm_alaw_tableinit();
41.         break;

libavcodec/pcm.c:42:5: Switch condition is false. Skipping switch case
40.         pcm_alaw_tableinit();
41.         break;
42.     case CODEC_ID_PCM_MULAW:
        ^
43.         pcm_ulaw_tableinit();
44.         break;

libavcodec/pcm.c:49:5: 
47.     }
48. 
49.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
        ^
50.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
51.     avctx->coded_frame= avcodec_alloc_frame();

libavcodec/utils.c:1612:1: start of procedure av_get_bits_per_sample()
  1610. #endif
  1611. 
  1612. int av_get_bits_per_sample(enum CodecID codec_id){
        ^
  1613.     switch(codec_id){
  1614.     case CODEC_ID_ADPCM_SBPRO_2:

libavcodec/utils.c:1613:5: 
  1611. 
  1612. int av_get_bits_per_sample(enum CodecID codec_id){
  1613.     switch(codec_id){
            ^
  1614.     case CODEC_ID_ADPCM_SBPRO_2:
  1615.         return 2;

libavcodec/utils.c:1614:5: Switch condition is false. Skipping switch case
  1612. int av_get_bits_per_sample(enum CodecID codec_id){
  1613.     switch(codec_id){
  1614.     case CODEC_ID_ADPCM_SBPRO_2:
            ^
  1615.         return 2;
  1616.     case CODEC_ID_ADPCM_SBPRO_3:

libavcodec/utils.c:1616:5: Switch condition is false. Skipping switch case
  1614.     case CODEC_ID_ADPCM_SBPRO_2:
  1615.         return 2;
  1616.     case CODEC_ID_ADPCM_SBPRO_3:
            ^
  1617.         return 3;
  1618.     case CODEC_ID_ADPCM_SBPRO_4:

libavcodec/utils.c:1618:5: Switch condition is false. Skipping switch case
  1616.     case CODEC_ID_ADPCM_SBPRO_3:
  1617.         return 3;
  1618.     case CODEC_ID_ADPCM_SBPRO_4:
            ^
  1619.     case CODEC_ID_ADPCM_CT:
  1620.     case CODEC_ID_ADPCM_IMA_WAV:

libavcodec/utils.c:1619:5: Switch condition is false. Skipping switch case
  1617.         return 3;
  1618.     case CODEC_ID_ADPCM_SBPRO_4:
  1619.     case CODEC_ID_ADPCM_CT:
            ^
  1620.     case CODEC_ID_ADPCM_IMA_WAV:
  1621.     case CODEC_ID_ADPCM_IMA_QT:

libavcodec/utils.c:1620:5: Switch condition is false. Skipping switch case
  1618.     case CODEC_ID_ADPCM_SBPRO_4:
  1619.     case CODEC_ID_ADPCM_CT:
  1620.     case CODEC_ID_ADPCM_IMA_WAV:
            ^
  1621.     case CODEC_ID_ADPCM_IMA_QT:
  1622.     case CODEC_ID_ADPCM_SWF:

libavcodec/utils.c:1621:5: Switch condition is false. Skipping switch case
  1619.     case CODEC_ID_ADPCM_CT:
  1620.     case CODEC_ID_ADPCM_IMA_WAV:
  1621.     case CODEC_ID_ADPCM_IMA_QT:
            ^
  1622.     case CODEC_ID_ADPCM_SWF:
  1623.     case CODEC_ID_ADPCM_MS:

libavcodec/utils.c:1622:5: Switch condition is false. Skipping switch case
  1620.     case CODEC_ID_ADPCM_IMA_WAV:
  1621.     case CODEC_ID_ADPCM_IMA_QT:
  1622.     case CODEC_ID_ADPCM_SWF:
            ^
  1623.     case CODEC_ID_ADPCM_MS:
  1624.     case CODEC_ID_ADPCM_YAMAHA:

libavcodec/utils.c:1623:5: Switch condition is false. Skipping switch case
  1621.     case CODEC_ID_ADPCM_IMA_QT:
  1622.     case CODEC_ID_ADPCM_SWF:
  1623.     case CODEC_ID_ADPCM_MS:
            ^
  1624.     case CODEC_ID_ADPCM_YAMAHA:
  1625.     case CODEC_ID_ADPCM_G722:

libavcodec/utils.c:1624:5: Switch condition is false. Skipping switch case
  1622.     case CODEC_ID_ADPCM_SWF:
  1623.     case CODEC_ID_ADPCM_MS:
  1624.     case CODEC_ID_ADPCM_YAMAHA:
            ^
  1625.     case CODEC_ID_ADPCM_G722:
  1626.         return 4;

libavcodec/utils.c:1625:5: Switch condition is false. Skipping switch case
  1623.     case CODEC_ID_ADPCM_MS:
  1624.     case CODEC_ID_ADPCM_YAMAHA:
  1625.     case CODEC_ID_ADPCM_G722:
            ^
  1626.         return 4;
  1627.     case CODEC_ID_PCM_ALAW:

libavcodec/utils.c:1627:5: Switch condition is false. Skipping switch case
  1625.     case CODEC_ID_ADPCM_G722:
  1626.         return 4;
  1627.     case CODEC_ID_PCM_ALAW:
            ^
  1628.     case CODEC_ID_PCM_MULAW:
  1629.     case CODEC_ID_PCM_S8:

libavcodec/utils.c:1628:5: Switch condition is false. Skipping switch case
  1626.         return 4;
  1627.     case CODEC_ID_PCM_ALAW:
  1628.     case CODEC_ID_PCM_MULAW:
            ^
  1629.     case CODEC_ID_PCM_S8:
  1630.     case CODEC_ID_PCM_U8:

libavcodec/utils.c:1629:5: Switch condition is false. Skipping switch case
  1627.     case CODEC_ID_PCM_ALAW:
  1628.     case CODEC_ID_PCM_MULAW:
  1629.     case CODEC_ID_PCM_S8:
            ^
  1630.     case CODEC_ID_PCM_U8:
  1631.     case CODEC_ID_PCM_ZORK:

libavcodec/utils.c:1630:5: Switch condition is false. Skipping switch case
  1628.     case CODEC_ID_PCM_MULAW:
  1629.     case CODEC_ID_PCM_S8:
  1630.     case CODEC_ID_PCM_U8:
            ^
  1631.     case CODEC_ID_PCM_ZORK:
  1632.         return 8;

libavcodec/utils.c:1631:5: Switch condition is false. Skipping switch case
  1629.     case CODEC_ID_PCM_S8:
  1630.     case CODEC_ID_PCM_U8:
  1631.     case CODEC_ID_PCM_ZORK:
            ^
  1632.         return 8;
  1633.     case CODEC_ID_PCM_S16BE:

libavcodec/utils.c:1633:5: Switch condition is false. Skipping switch case
  1631.     case CODEC_ID_PCM_ZORK:
  1632.         return 8;
  1633.     case CODEC_ID_PCM_S16BE:
            ^
  1634.     case CODEC_ID_PCM_S16LE:
  1635.     case CODEC_ID_PCM_S16LE_PLANAR:

libavcodec/utils.c:1634:5: Switch condition is false. Skipping switch case
  1632.         return 8;
  1633.     case CODEC_ID_PCM_S16BE:
  1634.     case CODEC_ID_PCM_S16LE:
            ^
  1635.     case CODEC_ID_PCM_S16LE_PLANAR:
  1636.     case CODEC_ID_PCM_U16BE:

libavcodec/utils.c:1635:5: Switch condition is false. Skipping switch case
  1633.     case CODEC_ID_PCM_S16BE:
  1634.     case CODEC_ID_PCM_S16LE:
  1635.     case CODEC_ID_PCM_S16LE_PLANAR:
            ^
  1636.     case CODEC_ID_PCM_U16BE:
  1637.     case CODEC_ID_PCM_U16LE:

libavcodec/utils.c:1636:5: Switch condition is false. Skipping switch case
  1634.     case CODEC_ID_PCM_S16LE:
  1635.     case CODEC_ID_PCM_S16LE_PLANAR:
  1636.     case CODEC_ID_PCM_U16BE:
            ^
  1637.     case CODEC_ID_PCM_U16LE:
  1638.         return 16;

libavcodec/utils.c:1637:5: Switch condition is false. Skipping switch case
  1635.     case CODEC_ID_PCM_S16LE_PLANAR:
  1636.     case CODEC_ID_PCM_U16BE:
  1637.     case CODEC_ID_PCM_U16LE:
            ^
  1638.         return 16;
  1639.     case CODEC_ID_PCM_S24DAUD:

libavcodec/utils.c:1639:5: Switch condition is false. Skipping switch case
  1637.     case CODEC_ID_PCM_U16LE:
  1638.         return 16;
  1639.     case CODEC_ID_PCM_S24DAUD:
            ^
  1640.     case CODEC_ID_PCM_S24BE:
  1641.     case CODEC_ID_PCM_S24LE:

libavcodec/utils.c:1640:5: Switch condition is false. Skipping switch case
  1638.         return 16;
  1639.     case CODEC_ID_PCM_S24DAUD:
  1640.     case CODEC_ID_PCM_S24BE:
            ^
  1641.     case CODEC_ID_PCM_S24LE:
  1642.     case CODEC_ID_PCM_U24BE:

libavcodec/utils.c:1641:5: Switch condition is false. Skipping switch case
  1639.     case CODEC_ID_PCM_S24DAUD:
  1640.     case CODEC_ID_PCM_S24BE:
  1641.     case CODEC_ID_PCM_S24LE:
            ^
  1642.     case CODEC_ID_PCM_U24BE:
  1643.     case CODEC_ID_PCM_U24LE:

libavcodec/utils.c:1642:5: Switch condition is false. Skipping switch case
  1640.     case CODEC_ID_PCM_S24BE:
  1641.     case CODEC_ID_PCM_S24LE:
  1642.     case CODEC_ID_PCM_U24BE:
            ^
  1643.     case CODEC_ID_PCM_U24LE:
  1644.         return 24;

libavcodec/utils.c:1643:5: Switch condition is false. Skipping switch case
  1641.     case CODEC_ID_PCM_S24LE:
  1642.     case CODEC_ID_PCM_U24BE:
  1643.     case CODEC_ID_PCM_U24LE:
            ^
  1644.         return 24;
  1645.     case CODEC_ID_PCM_S32BE:

libavcodec/utils.c:1645:5: Switch condition is false. Skipping switch case
  1643.     case CODEC_ID_PCM_U24LE:
  1644.         return 24;
  1645.     case CODEC_ID_PCM_S32BE:
            ^
  1646.     case CODEC_ID_PCM_S32LE:
  1647.     case CODEC_ID_PCM_U32BE:

libavcodec/utils.c:1646:5: Switch condition is false. Skipping switch case
  1644.         return 24;
  1645.     case CODEC_ID_PCM_S32BE:
  1646.     case CODEC_ID_PCM_S32LE:
            ^
  1647.     case CODEC_ID_PCM_U32BE:
  1648.     case CODEC_ID_PCM_U32LE:

libavcodec/utils.c:1647:5: Switch condition is false. Skipping switch case
  1645.     case CODEC_ID_PCM_S32BE:
  1646.     case CODEC_ID_PCM_S32LE:
  1647.     case CODEC_ID_PCM_U32BE:
            ^
  1648.     case CODEC_ID_PCM_U32LE:
  1649.     case CODEC_ID_PCM_F32BE:

libavcodec/utils.c:1648:5: Switch condition is false. Skipping switch case
  1646.     case CODEC_ID_PCM_S32LE:
  1647.     case CODEC_ID_PCM_U32BE:
  1648.     case CODEC_ID_PCM_U32LE:
            ^
  1649.     case CODEC_ID_PCM_F32BE:
  1650.     case CODEC_ID_PCM_F32LE:

libavcodec/utils.c:1649:5: Switch condition is false. Skipping switch case
  1647.     case CODEC_ID_PCM_U32BE:
  1648.     case CODEC_ID_PCM_U32LE:
  1649.     case CODEC_ID_PCM_F32BE:
            ^
  1650.     case CODEC_ID_PCM_F32LE:
  1651.         return 32;

libavcodec/utils.c:1650:5: Switch condition is false. Skipping switch case
  1648.     case CODEC_ID_PCM_U32LE:
  1649.     case CODEC_ID_PCM_F32BE:
  1650.     case CODEC_ID_PCM_F32LE:
            ^
  1651.         return 32;
  1652.     case CODEC_ID_PCM_F64BE:

libavcodec/utils.c:1652:5: Switch condition is false. Skipping switch case
  1650.     case CODEC_ID_PCM_F32LE:
  1651.         return 32;
  1652.     case CODEC_ID_PCM_F64BE:
            ^
  1653.     case CODEC_ID_PCM_F64LE:
  1654.         return 64;

libavcodec/utils.c:1653:5: Switch condition is false. Skipping switch case
  1651.         return 32;
  1652.     case CODEC_ID_PCM_F64BE:
  1653.     case CODEC_ID_PCM_F64LE:
            ^
  1654.         return 64;
  1655.     default:

libavcodec/utils.c:1656:9: 
  1654.         return 64;
  1655.     default:
  1656.         return 0;
                ^
  1657.     }
  1658. }

libavcodec/utils.c:1658:1: return from a call to av_get_bits_per_sample
  1656.         return 0;
  1657.     }
  1658. }
        ^
  1659. 
  1660. #if FF_API_OLD_SAMPLE_FMT

libavcodec/pcm.c:50:5: 
48. 
49.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
50.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
        ^
51.     avctx->coded_frame= avcodec_alloc_frame();
52.     avctx->coded_frame->key_frame= 1;

libavcodec/pcm.c:51:5: 
49.     avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
50.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
51.     avctx->coded_frame= avcodec_alloc_frame();
        ^
52.     avctx->coded_frame->key_frame= 1;
53. 

libavcodec/utils.c:618:1: start of procedure avcodec_alloc_frame()
  616. }
  617. 
  618. AVFrame *avcodec_alloc_frame(void){
       ^
  619.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  620. 

libavcodec/utils.c:619:5: 
  617. 
  618. AVFrame *avcodec_alloc_frame(void){
  619.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  620. 
  621.     if(pic==NULL) return NULL;

libavutil/mem.c:64:1: start of procedure av_malloc()
    62.    linker will do it automatically. */
    63. 
    64. void *av_malloc(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking false branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:83:9: Taking false branch
    81.     ((char*)ptr)[-1]= diff;
    82. #elif HAVE_POSIX_MEMALIGN
    83.     if (posix_memalign(&ptr,32,size))
                ^
    84.         ptr = NULL;
    85. #elif HAVE_MEMALIGN

libavutil/mem.c:114:5: 
    112.     ptr = malloc(size);
    113. #endif
    114.     return ptr;
             ^
    115. }
    116. 

libavutil/mem.c:115:1: return from a call to av_malloc
    113. #endif
    114.     return ptr;
    115. }
         ^
    116. 
    117. void *av_realloc(void *ptr, size_t size)

libavcodec/utils.c:621:8: Taking true branch
  619.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  620. 
  621.     if(pic==NULL) return NULL;
              ^
  622. 
  623.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:621:19: 
  619.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  620. 
  621.     if(pic==NULL) return NULL;
                         ^
  622. 
  623.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:626:1: return from a call to avcodec_alloc_frame
  624. 
  625.     return pic;
  626. }
       ^
  627. 
  628. #if FF_API_AVCODEC_OPEN

libavcodec/pcm.c:52:5: 
50.     avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8;
51.     avctx->coded_frame= avcodec_alloc_frame();
52.     avctx->coded_frame->key_frame= 1;
        ^
53. 
54.     return 0;
