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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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