libavcodec/vorbis_enc.c:916: error: Null Dereference
  pointer `avccontext->coded_frame` last assigned on line 915 could be null and is dereferenced at line 916, column 5.

libavcodec/vorbis_enc.c:894:1: start of procedure vorbis_encode_init()
892. }
893. 
894. static av_cold int vorbis_encode_init(AVCodecContext * avccontext)
     ^
895. {
896.     vorbis_enc_context * venc = avccontext->priv_data;

libavcodec/vorbis_enc.c:896:5: 
894. static av_cold int vorbis_encode_init(AVCodecContext * avccontext)
895. {
896.     vorbis_enc_context * venc = avccontext->priv_data;
         ^
897. 
898.     if (avccontext->channels != 2) {

libavcodec/vorbis_enc.c:898:9: Taking false branch
896.     vorbis_enc_context * venc = avccontext->priv_data;
897. 
898.     if (avccontext->channels != 2) {
             ^
899.         av_log(avccontext, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\n");
900.         return -1;

libavcodec/vorbis_enc.c:903:5: Skipping create_vorbis_context(): empty list of specs
901.     }
902. 
903.     create_vorbis_context(venc, avccontext);
         ^
904. 
905.     if (avccontext->flags & CODEC_FLAG_QSCALE)

libavcodec/vorbis_enc.c:905:9: Taking true branch
903.     create_vorbis_context(venc, avccontext);
904. 
905.     if (avccontext->flags & CODEC_FLAG_QSCALE)
             ^
906.         venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;
907.     else

libavcodec/vorbis_enc.c:906:9: 
904. 
905.     if (avccontext->flags & CODEC_FLAG_QSCALE)
906.         venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;
             ^
907.     else
908.         venc->quality = 1.;

libavcodec/vorbis_enc.c:909:5: 
907.     else
908.         venc->quality = 1.;
909.     venc->quality *= venc->quality;
         ^
910. 
911.     avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);

libavcodec/vorbis_enc.c:911:5: Skipping put_main_header(): empty list of specs
909.     venc->quality *= venc->quality;
910. 
911.     avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);
         ^
912. 
913.     avccontext->frame_size = 1 << (venc->log2_blocksize[0] - 1);

libavcodec/vorbis_enc.c:913:5: 
911.     avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);
912. 
913.     avccontext->frame_size = 1 << (venc->log2_blocksize[0] - 1);
         ^
914. 
915.     avccontext->coded_frame = avcodec_alloc_frame();

libavcodec/vorbis_enc.c:915:5: 
913.     avccontext->frame_size = 1 << (venc->log2_blocksize[0] - 1);
914. 
915.     avccontext->coded_frame = avcodec_alloc_frame();
         ^
916.     avccontext->coded_frame->key_frame = 1;
917. 

libavcodec/utils.c:815:1: start of procedure avcodec_alloc_frame()
  813. }
  814. 
  815. AVFrame *avcodec_alloc_frame(void){
       ^
  816.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  817. 

libavcodec/utils.c:816:5: 
  814. 
  815. AVFrame *avcodec_alloc_frame(void){
  816.     AVFrame *pic= av_malloc(sizeof(AVFrame));
           ^
  817. 
  818.     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:818:8: Taking true branch
  816.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  817. 
  818.     if(pic==NULL) return NULL;
              ^
  819. 
  820.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:818:19: 
  816.     AVFrame *pic= av_malloc(sizeof(AVFrame));
  817. 
  818.     if(pic==NULL) return NULL;
                         ^
  819. 
  820.     avcodec_get_frame_defaults(pic);

libavcodec/utils.c:823:1: return from a call to avcodec_alloc_frame
  821. 
  822.     return pic;
  823. }
       ^
  824. 
  825. int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)

libavcodec/vorbis_enc.c:916:5: 
914. 
915.     avccontext->coded_frame = avcodec_alloc_frame();
916.     avccontext->coded_frame->key_frame = 1;
         ^
917. 
918.     return 0;

static av_cold int vorbis_encode_init(AVCodecContext * avccontext)
{
    vorbis_enc_context * venc = avccontext->priv_data;
    if (avccontext->channels != 2) {
        av_log(avccontext, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\n");
        return -1;
    }
    create_vorbis_context(venc, avccontext);
    if (avccontext->flags & CODEC_FLAG_QSCALE)
        venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;
    else
        venc->quality = 1.;
    venc->quality *= venc->quality;
    avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);
    avccontext->frame_size = 1 << (venc->log2_blocksize[0] - 1);
    avccontext->coded_frame = avcodec_alloc_frame();
    avccontext->coded_frame->key_frame = 1;
    return 0;
}
['static av_cold int vorbis_encode_init(AVCodecContext * avccontext)\n{\n    vorbis_enc_context * venc = avccontext->priv_data;\n    if (avccontext->channels != 2) {\n        av_log(avccontext, AV_LOG_ERROR, "Current FFmpeg Vorbis encoder only supports 2 channels.\\n");\n        return -1;\n    }\n    create_vorbis_context(venc, avccontext);\n    if (avccontext->flags & CODEC_FLAG_QSCALE)\n        venc->quality = avccontext->global_quality / (float)FF_QP2LAMBDA / 10.;\n    else\n        venc->quality = 1.;\n    venc->quality *= venc->quality;\n    avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);\n    avccontext->frame_size = 1 << (venc->log2_blocksize[0] - 1);\n    avccontext->coded_frame = avcodec_alloc_frame();\n    avccontext->coded_frame->key_frame = 1;\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;\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_MEMALIGN)\n    ptr = memalign(16,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']