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

libavcodec/adpcm.c:152:1: start of procedure adpcm_encode_init()
150. 
151. #if CONFIG_ENCODERS
152. static int adpcm_encode_init(AVCodecContext *avctx)
     ^
153. {
154.     if (avctx->channels > 2)

libavcodec/adpcm.c:154:9: Taking false branch
152. static int adpcm_encode_init(AVCodecContext *avctx)
153. {
154.     if (avctx->channels > 2)
             ^
155.         return -1; /* only stereo or mono =) */
156. 

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

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

libavcodec/adpcm.c:162:5: 
160.     }
161. 
162.     switch(avctx->codec->id) {
         ^
163.     case CODEC_ID_ADPCM_IMA_WAV:
164.         avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */

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

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

libavcodec/adpcm.c:170:9: 
168.         break;
169.     case CODEC_ID_ADPCM_IMA_QT:
170.         avctx->frame_size = 64;
             ^
171.         avctx->block_align = 34 * avctx->channels;
172.         break;

libavcodec/adpcm.c:171:9: 
169.     case CODEC_ID_ADPCM_IMA_QT:
170.         avctx->frame_size = 64;
171.         avctx->block_align = 34 * avctx->channels;
             ^
172.         break;
173.     case CODEC_ID_ADPCM_MS:

libavcodec/adpcm.c:196:5: 
194.     }
195. 
196.     avctx->coded_frame= avcodec_alloc_frame();
         ^
197.     avctx->coded_frame->key_frame= 1;
198. 

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/adpcm.c:197:5: 
195. 
196.     avctx->coded_frame= avcodec_alloc_frame();
197.     avctx->coded_frame->key_frame= 1;
         ^
198. 
199.     return 0;
