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

libavcodec/parser.c:174:1: start of procedure av_parser_change()
172. }
173. 
174. int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
     ^
175.                      uint8_t **poutbuf, int *poutbuf_size,
176.                      const uint8_t *buf, int buf_size, int keyframe)

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

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

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

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

libavcodec/parser.c:182:13: 
180.             avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER) {
181.             int i = s->parser->split(avctx, buf, buf_size);
182.             buf      += i;
                 ^
183.             buf_size -= i;
184.         }

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

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

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

libavcodec/parser.c:190:9: Taking true branch
188.     *poutbuf      = (uint8_t *) buf;
189.     *poutbuf_size = buf_size;
190.     if (avctx->extradata) {
             ^
191.         if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) {
192.             int size = buf_size + avctx->extradata_size;

libavcodec/parser.c:191:13: Taking true branch
189.     *poutbuf_size = buf_size;
190.     if (avctx->extradata) {
191.         if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) {
                 ^
192.             int size = buf_size + avctx->extradata_size;
193. 

libavcodec/parser.c:191:26: Taking true branch
189.     *poutbuf_size = buf_size;
190.     if (avctx->extradata) {
191.         if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) {
                              ^
192.             int size = buf_size + avctx->extradata_size;
193. 

libavcodec/parser.c:192:13: 
190.     if (avctx->extradata) {
191.         if (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) {
192.             int size = buf_size + avctx->extradata_size;
                 ^
193. 
194.             *poutbuf_size = size;

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

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

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

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

libavutil/mem.c:70:9: Taking true branch
  68. 
  69.     /* let's disallow possibly ambiguous cases */
  70.     if (size > (INT_MAX - 32) || !size)
              ^
  71.         return NULL;
  72. 

libavutil/mem.c:71:9: 
  69.     /* let's disallow possibly ambiguous cases */
  70.     if (size > (INT_MAX - 32) || !size)
  71.         return NULL;
              ^
  72. 
  73. #if CONFIG_MEMALIGN_HACK

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

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