summaryrefslogtreecommitdiff
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 6d20516f28..0a5c2cae33 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -193,6 +193,8 @@ int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
*poutbuf_size = size;
*poutbuf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!*poutbuf)
+ return AVERROR(ENOMEM);
memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
memcpy(*poutbuf + avctx->extradata_size, buf,