summaryrefslogtreecommitdiff
path: root/libavcodec/imx_dump_header_bsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/imx_dump_header_bsf.c')
-rw-r--r--libavcodec/imx_dump_header_bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c
index 5f5493f5a8..5c647c4d68 100644
--- a/libavcodec/imx_dump_header_bsf.c
+++ b/libavcodec/imx_dump_header_bsf.c
@@ -43,6 +43,8 @@ static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx
}
*poutbuf = av_malloc(buf_size + 20 + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!*poutbuf)
+ return AVERROR(ENOMEM);
poutbufp = *poutbuf;
bytestream_put_buffer(&poutbufp, imx_header, 16);
bytestream_put_byte(&poutbufp, 0x83); /* KLV BER long form */