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

libavcodec/parser.c:198:1: start of procedure av_parser_change()
196.  * @deprecated use AVBitstreamFilter
197.  */
198. int av_parser_change(AVCodecParserContext *s,
     ^
199.                      AVCodecContext *avctx,
200.                      uint8_t **poutbuf, int *poutbuf_size,

libavcodec/parser.c:203:8: Taking true branch
201.                      const uint8_t *buf, int buf_size, int keyframe){
202. 
203.     if(s && s->parser->split){
            ^
204.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
205.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:203:13: Taking true branch
201.                      const uint8_t *buf, int buf_size, int keyframe){
202. 
203.     if(s && s->parser->split){
                 ^
204.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
205.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:204:13: Taking true branch
202. 
203.     if(s && s->parser->split){
204.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
                 ^
205.             int i= s->parser->split(avctx, buf, buf_size);
206.             buf += i;

libavcodec/parser.c:205:13: Skipping __function_pointer__(): unresolved function pointer
203.     if(s && s->parser->split){
204.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
205.             int i= s->parser->split(avctx, buf, buf_size);
                 ^
206.             buf += i;
207.             buf_size -= i;

libavcodec/parser.c:206:13: 
204.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
205.             int i= s->parser->split(avctx, buf, buf_size);
206.             buf += i;
                 ^
207.             buf_size -= i;
208.         }

libavcodec/parser.c:207:13: 
205.             int i= s->parser->split(avctx, buf, buf_size);
206.             buf += i;
207.             buf_size -= i;
                 ^
208.         }
209.     }

libavcodec/parser.c:212:5: 
210. 
211.     /* cast to avoid warning about discarding qualifiers */
212.     *poutbuf= (uint8_t *) buf;
         ^
213.     *poutbuf_size= buf_size;
214.     if(avctx->extradata){

libavcodec/parser.c:213:5: 
211.     /* cast to avoid warning about discarding qualifiers */
212.     *poutbuf= (uint8_t *) buf;
213.     *poutbuf_size= buf_size;
         ^
214.     if(avctx->extradata){
215.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))

libavcodec/parser.c:214:8: Taking true branch
212.     *poutbuf= (uint8_t *) buf;
213.     *poutbuf_size= buf_size;
214.     if(avctx->extradata){
            ^
215.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
216.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/

libavcodec/parser.c:215:15: Taking true branch
213.     *poutbuf_size= buf_size;
214.     if(avctx->extradata){
215.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                   ^
216.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
217.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:215:28: Taking true branch
213.     *poutbuf_size= buf_size;
214.     if(avctx->extradata){
215.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                                ^
216.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
217.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:218:13: 
216.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
217.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
218.             int size= buf_size + avctx->extradata_size;
                 ^
219.             *poutbuf_size= size;
220.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);

libavcodec/parser.c:219:13: 
217.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
218.             int size= buf_size + avctx->extradata_size;
219.             *poutbuf_size= size;
                 ^
220.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
221. 

libavcodec/parser.c:220:13: 
218.             int size= buf_size + avctx->extradata_size;
219.             *poutbuf_size= size;
220.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
                 ^
221. 
222.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);

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 true branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:56:9: 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
  56.         return NULL;
              ^
  57. 
  58. #if CONFIG_MEMALIGN_HACK

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/parser.c:222:13: 
220.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
221. 
222.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
                 ^
223.             memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
224.             return 1;
