bsf: check memory allocations

This commit is contained in:
Vittorio Giovara
2014-12-18 20:26:56 +01:00
parent 014b6b416f
commit 8a9641a652
7 changed files with 24 additions and 3 deletions
+2
View File
@@ -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 */