libavcodec/parser.c:195: error: Null Dereference
  pointer `*poutbuf` last assigned on line 193 could be null and is dereferenced by call to `memcpy()` at line 195, column 13.

libavcodec/parser.c:171:1: start of procedure av_parser_change()
169.  * @deprecated use AVBitstreamFilter
170.  */
171. int av_parser_change(AVCodecParserContext *s,
     ^
172.                      AVCodecContext *avctx,
173.                      uint8_t **poutbuf, int *poutbuf_size,

libavcodec/parser.c:176:8: Taking true branch
174.                      const uint8_t *buf, int buf_size, int keyframe){
175. 
176.     if(s && s->parser->split){
            ^
177.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
178.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:176:13: Taking true branch
174.                      const uint8_t *buf, int buf_size, int keyframe){
175. 
176.     if(s && s->parser->split){
                 ^
177.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
178.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:177:13: Taking true branch
175. 
176.     if(s && s->parser->split){
177.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
                 ^
178.             int i= s->parser->split(avctx, buf, buf_size);
179.             buf += i;

libavcodec/parser.c:178:13: Skipping __function_pointer__(): unresolved function pointer
176.     if(s && s->parser->split){
177.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
178.             int i= s->parser->split(avctx, buf, buf_size);
                 ^
179.             buf += i;
180.             buf_size -= i;

libavcodec/parser.c:179:13: 
177.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
178.             int i= s->parser->split(avctx, buf, buf_size);
179.             buf += i;
                 ^
180.             buf_size -= i;
181.         }

libavcodec/parser.c:180:13: 
178.             int i= s->parser->split(avctx, buf, buf_size);
179.             buf += i;
180.             buf_size -= i;
                 ^
181.         }
182.     }

libavcodec/parser.c:185:5: 
183. 
184.     /* cast to avoid warning about discarding qualifiers */
185.     *poutbuf= (uint8_t *) buf;
         ^
186.     *poutbuf_size= buf_size;
187.     if(avctx->extradata){

libavcodec/parser.c:186:5: 
184.     /* cast to avoid warning about discarding qualifiers */
185.     *poutbuf= (uint8_t *) buf;
186.     *poutbuf_size= buf_size;
         ^
187.     if(avctx->extradata){
188.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))

libavcodec/parser.c:187:8: Taking true branch
185.     *poutbuf= (uint8_t *) buf;
186.     *poutbuf_size= buf_size;
187.     if(avctx->extradata){
            ^
188.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
189.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/

libavcodec/parser.c:188:15: Taking true branch
186.     *poutbuf_size= buf_size;
187.     if(avctx->extradata){
188.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                   ^
189.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
190.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:188:28: Taking true branch
186.     *poutbuf_size= buf_size;
187.     if(avctx->extradata){
188.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                                ^
189.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
190.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:191:13: 
189.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
190.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
191.             int size= buf_size + avctx->extradata_size;
                 ^
192.             *poutbuf_size= size;
193.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);

libavcodec/parser.c:192:13: 
190.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
191.             int size= buf_size + avctx->extradata_size;
192.             *poutbuf_size= size;
                 ^
193.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
194. 

libavcodec/parser.c:193:13: 
191.             int size= buf_size + avctx->extradata_size;
192.             *poutbuf_size= size;
193.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
                 ^
194. 
195.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);

libavutil/mem.c:64:1: start of procedure av_malloc()
  62.    linker will do it automatically. */
  63. 
  64. void *av_malloc(size_t size)
      ^
  65. {
  66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
  64. void *av_malloc(size_t size)
  65. {
  66.     void *ptr = NULL;
          ^
  67. #if CONFIG_MEMALIGN_HACK
  68.     long diff;

libavutil/mem.c:72:8: Taking true branch
  70. 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
             ^
  73.         return NULL;
  74. 

libavutil/mem.c:73:9: 
  71.     /* let's disallow possible ambiguous cases */
  72.     if(size > (INT_MAX-16) )
  73.         return NULL;
              ^
  74. 
  75. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:117:1: return from a call to av_malloc
  115. #endif
  116.     return ptr;
  117. }
       ^
  118. 
  119. void *av_realloc(void *ptr, size_t size)

libavcodec/parser.c:195:13: 
193.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
194. 
195.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
                 ^
196.             memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
197.             return 1;
