mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-04-30 11:40:35 +08:00
bsf: check memory allocations
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user