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

libavcodec/parser.c:177:1: start of procedure av_parser_change()
175.  * @deprecated use AVBitstreamFilter
176.  */
177. int av_parser_change(AVCodecParserContext *s,
     ^
178.                      AVCodecContext *avctx,
179.                      uint8_t **poutbuf, int *poutbuf_size,

libavcodec/parser.c:182:8: Taking true branch
180.                      const uint8_t *buf, int buf_size, int keyframe){
181. 
182.     if(s && s->parser->split){
            ^
183.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
184.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:182:13: Taking true branch
180.                      const uint8_t *buf, int buf_size, int keyframe){
181. 
182.     if(s && s->parser->split){
                 ^
183.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
184.             int i= s->parser->split(avctx, buf, buf_size);

libavcodec/parser.c:183:13: Taking true branch
181. 
182.     if(s && s->parser->split){
183.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
                 ^
184.             int i= s->parser->split(avctx, buf, buf_size);
185.             buf += i;

libavcodec/parser.c:184:13: Skipping __function_pointer__(): unresolved function pointer
182.     if(s && s->parser->split){
183.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
184.             int i= s->parser->split(avctx, buf, buf_size);
                 ^
185.             buf += i;
186.             buf_size -= i;

libavcodec/parser.c:185:13: 
183.         if((avctx->flags & CODEC_FLAG_GLOBAL_HEADER) || (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)){
184.             int i= s->parser->split(avctx, buf, buf_size);
185.             buf += i;
                 ^
186.             buf_size -= i;
187.         }

libavcodec/parser.c:186:13: 
184.             int i= s->parser->split(avctx, buf, buf_size);
185.             buf += i;
186.             buf_size -= i;
                 ^
187.         }
188.     }

libavcodec/parser.c:191:5: 
189. 
190.     /* cast to avoid warning about discarding qualifiers */
191.     *poutbuf= (uint8_t *) buf;
         ^
192.     *poutbuf_size= buf_size;
193.     if(avctx->extradata){

libavcodec/parser.c:192:5: 
190.     /* cast to avoid warning about discarding qualifiers */
191.     *poutbuf= (uint8_t *) buf;
192.     *poutbuf_size= buf_size;
         ^
193.     if(avctx->extradata){
194.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))

libavcodec/parser.c:193:8: Taking true branch
191.     *poutbuf= (uint8_t *) buf;
192.     *poutbuf_size= buf_size;
193.     if(avctx->extradata){
            ^
194.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
195.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/

libavcodec/parser.c:194:15: Taking true branch
192.     *poutbuf_size= buf_size;
193.     if(avctx->extradata){
194.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                   ^
195.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
196.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:194:28: Taking true branch
192.     *poutbuf_size= buf_size;
193.     if(avctx->extradata){
194.         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
                                ^
195.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
196.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){

libavcodec/parser.c:197:13: 
195.             /*||(s->pict_type != FF_I_TYPE && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_NOKEY))*/
196.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
197.             int size= buf_size + avctx->extradata_size;
                 ^
198.             *poutbuf_size= size;
199.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);

libavcodec/parser.c:198:13: 
196.             /*||(? && (s->flags & PARSER_FLAG_DUMP_EXTRADATA_AT_BEGIN)*/){
197.             int size= buf_size + avctx->extradata_size;
198.             *poutbuf_size= size;
                 ^
199.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
200. 

libavcodec/parser.c:199:13: 
197.             int size= buf_size + avctx->extradata_size;
198.             *poutbuf_size= size;
199.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
                 ^
200. 
201.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);

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 true branch
  49. 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
             ^
  52.         return NULL;
  53. 

libavutil/mem.c:52:9: 
  50.     /* let's disallow possible ambiguous cases */
  51.     if(size > (INT_MAX-16) )
  52.         return NULL;
              ^
  53. 
  54. #ifdef CONFIG_MEMALIGN_HACK

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/parser.c:201:13: 
199.             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
200. 
201.             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
                 ^
202.             memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
203.             return 1;
