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

libavcodec/adxenc.c:113:1: start of procedure adx_encode_init()
111. }
112. 
113. static av_cold int adx_encode_init(AVCodecContext *avctx)
     ^
114. {
115.     if (avctx->channels > 2)

libavcodec/adxenc.c:115:9: Taking false branch
113. static av_cold int adx_encode_init(AVCodecContext *avctx)
114. {
115.     if (avctx->channels > 2)
             ^
116.         return -1; /* only stereo or mono =) */
117.     avctx->frame_size = 32;

libavcodec/adxenc.c:117:5: 
115.     if (avctx->channels > 2)
116.         return -1; /* only stereo or mono =) */
117.     avctx->frame_size = 32;
         ^
118. 
119.     avctx->coded_frame= avcodec_alloc_frame();

libavcodec/adxenc.c:119:5: 
117.     avctx->frame_size = 32;
118. 
119.     avctx->coded_frame= avcodec_alloc_frame();
         ^
120.     avctx->coded_frame->key_frame= 1;
121. 

libavcodec/utils.c:393:1: start of procedure avcodec_alloc_frame()
  391. }
  392. 
  393. AVFrame *avcodec_alloc_frame(void){
       ^
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 

libavcodec/utils.c:394:5: 
  392. 
  393. AVFrame *avcodec_alloc_frame(void){
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  395. 
  396.     if(pic==NULL) return NULL;

libavutil/mem.c:43:1: start of procedure av_malloc()
    41.    linker will do it automatically */
    42. 
    43. void *av_malloc(unsigned int size)
        ^
    44. {
    45.     void *ptr = NULL;

libavutil/mem.c:45:5: 
    43. void *av_malloc(unsigned int size)
    44. {
    45.     void *ptr = NULL;
            ^
    46. #ifdef CONFIG_MEMALIGN_HACK
    47.     long diff;

libavutil/mem.c:51:8: Taking false branch
    49. 
    50.     /* let's disallow possible ambiguous cases */
    51.     if(size > (INT_MAX-16) )
               ^
    52.         return NULL;
    53. 

libavutil/mem.c:62:5: Skipping posix_memalign(): method has no implementation
    60.     ((char*)ptr)[-1]= diff;
    61. #elif defined (HAVE_POSIX_MEMALIGN)
    62.     posix_memalign(&ptr,16,size);
            ^
    63. #elif defined (HAVE_MEMALIGN)
    64.     ptr = memalign(16,size);

libavutil/mem.c:94:5: 
    92.     ptr = malloc(size);
    93. #endif
    94.     return ptr;
            ^
    95. }
    96. 

libavutil/mem.c:95:1: return from a call to av_malloc
    93. #endif
    94.     return ptr;
    95. }
        ^
    96. 
    97. void *av_realloc(void *ptr, unsigned int size)

libavcodec/utils.c:396:8: Taking true branch
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 
  396.     if(pic==NULL) return NULL;
              ^
  397. 
  398.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:396:19: 
  394.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  395. 
  396.     if(pic==NULL) return NULL;
                         ^
  397. 
  398.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:401:1: return from a call to avcodec_alloc_frame
  399. 
  400.     return pic;
  401. }
       ^
  402. 
  403. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/adxenc.c:120:5: 
118. 
119.     avctx->coded_frame= avcodec_alloc_frame();
120.     avctx->coded_frame->key_frame= 1;
         ^
121. 
122. //    avctx->bit_rate = avctx->sample_rate*avctx->channels*18*8/32;

static av_cold int adx_encode_init(AVCodecContext *avctx)
{
    if (avctx->channels > 2)
        return -1;
    avctx->frame_size = 32;
    avctx->coded_frame= avcodec_alloc_frame();
    avctx->coded_frame->key_frame= 1;
    av_log(avctx, AV_LOG_DEBUG, "adx encode init\n");
    return 0;
}
['static av_cold int adx_encode_init(AVCodecContext *avctx)\n{\n    if (avctx->channels > 2)\n        return -1;\n    avctx->frame_size = 32;\n    avctx->coded_frame= avcodec_alloc_frame();\n    avctx->coded_frame->key_frame= 1;\n    av_log(avctx, AV_LOG_DEBUG, "adx encode init\\n");\n    return 0;\n}', 'AVFrame *avcodec_alloc_frame(void){\n    AVFrame *pic= av_malloc(sizeof(AVFrame));\n    if(pic==NULL) return NULL;\n    avcodec_get_frame_defaults(pic);\n    return pic;\n}', 'void *av_malloc(unsigned int size)\n{\n    void *ptr = NULL;\n#ifdef CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if(size > (INT_MAX-16) )\n        return NULL;\n#ifdef CONFIG_MEMALIGN_HACK\n    ptr = malloc(size+16);\n    if(!ptr)\n        return ptr;\n    diff= ((-(long)ptr - 1)&15) + 1;\n    ptr = (char*)ptr + diff;\n    ((char*)ptr)[-1]= diff;\n#elif defined (HAVE_POSIX_MEMALIGN)\n    posix_memalign(&ptr,16,size);\n#elif defined (HAVE_MEMALIGN)\n    ptr = memalign(16,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']