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

libavcodec/adpcm.c:157:1: start of procedure adpcm_encode_init()
155. 
156. #ifdef CONFIG_ENCODERS
157. static int adpcm_encode_init(AVCodecContext *avctx)
     ^
158. {
159.     if (avctx->channels > 2)

libavcodec/adpcm.c:159:9: Taking false branch
157. static int adpcm_encode_init(AVCodecContext *avctx)
158. {
159.     if (avctx->channels > 2)
             ^
160.         return -1; /* only stereo or mono =) */
161. 

libavcodec/adpcm.c:162:8: Taking true branch
160.         return -1; /* only stereo or mono =) */
161. 
162.     if(avctx->trellis && (unsigned)avctx->trellis > 16U){
            ^
163.         av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n");
164.         return -1;

libavcodec/adpcm.c:162:26: Taking false branch
160.         return -1; /* only stereo or mono =) */
161. 
162.     if(avctx->trellis && (unsigned)avctx->trellis > 16U){
                              ^
163.         av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n");
164.         return -1;

libavcodec/adpcm.c:167:5: 
165.     }
166. 
167.     switch(avctx->codec->id) {
         ^
168.     case CODEC_ID_ADPCM_IMA_WAV:
169.         avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */

libavcodec/adpcm.c:168:5: Switch condition is false. Skipping switch case
166. 
167.     switch(avctx->codec->id) {
168.     case CODEC_ID_ADPCM_IMA_WAV:
         ^
169.         avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */
170.                                                              /* and we have 4 bytes per channel overhead */

libavcodec/adpcm.c:174:5: Switch condition is true. Entering switch case
172.         /* seems frame_size isn't taken into account... have to buffer the samples :-( */
173.         break;
174.     case CODEC_ID_ADPCM_IMA_QT:
         ^
175.         avctx->frame_size = 64;
176.         avctx->block_align = 34 * avctx->channels;

libavcodec/adpcm.c:175:9: 
173.         break;
174.     case CODEC_ID_ADPCM_IMA_QT:
175.         avctx->frame_size = 64;
             ^
176.         avctx->block_align = 34 * avctx->channels;
177.         break;

libavcodec/adpcm.c:176:9: 
174.     case CODEC_ID_ADPCM_IMA_QT:
175.         avctx->frame_size = 64;
176.         avctx->block_align = 34 * avctx->channels;
             ^
177.         break;
178.     case CODEC_ID_ADPCM_MS:

libavcodec/adpcm.c:201:5: 
199.     }
200. 
201.     avctx->coded_frame= avcodec_alloc_frame();
         ^
202.     avctx->coded_frame->key_frame= 1;
203. 

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

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

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

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

libavcodec/adpcm.c:202:5: 
200. 
201.     avctx->coded_frame= avcodec_alloc_frame();
202.     avctx->coded_frame->key_frame= 1;
         ^
203. 
204.     return 0;
