提交 9e2dabed 编写于 作者: C Can Wu 提交者: Anton Khirnov

avio: check AVIOContext malloc failure

Signed-off-by: NAnton Khirnov <anton@khirnov.net>
上级 7d4c4394
......@@ -113,6 +113,8 @@ AVIOContext *avio_alloc_context(
int64_t (*seek)(void *opaque, int64_t offset, int whence))
{
AVIOContext *s = av_mallocz(sizeof(AVIOContext));
if (!s)
return NULL;
ffio_init_context(s, buffer, buffer_size, write_flag, opaque,
read_packet, write_packet, seek);
return s;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册