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

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

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

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

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

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

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

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

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

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

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

libavcodec/utils.c:430:1: start of procedure avcodec_alloc_frame()
  428. }
  429. 
  430. AVFrame *avcodec_alloc_frame(void){
       ^
  431.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  432. 

libavcodec/utils.c:431:5: 
  429. 
  430. AVFrame *avcodec_alloc_frame(void){
  431.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  432. 
  433.     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:9: Taking false branch
    64.     ((char*)ptr)[-1]= diff;
    65. #elif HAVE_POSIX_MEMALIGN
    66.     if (posix_memalign(&ptr,16,size))
                ^
    67.         ptr = NULL;
    68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
     97.     ptr = malloc(size);
     98. #endif
     99.     return ptr;
             ^
    100. }
    101. 

libavutil/mem.c:100:1: return from a call to av_malloc
     98. #endif
     99.     return ptr;
    100. }
         ^
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)

libavcodec/utils.c:433:8: Taking true branch
  431.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  432. 
  433.     if(pic==NULL) return NULL;
              ^
  434. 
  435.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:433:19: 
  431.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  432. 
  433.     if(pic==NULL) return NULL;
                         ^
  434. 
  435.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:438:1: return from a call to avcodec_alloc_frame
  436. 
  437.     return pic;
  438. }
       ^
  439. 
  440. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/adpcm.c:198:5: 
196. 
197.     avctx->coded_frame= avcodec_alloc_frame();
198.     avctx->coded_frame->key_frame= 1;
         ^
199. 
200.     return 0;
