提交 44127b15 编写于 作者: M Martin Storsjö

rtmppkt: Make pkt->data reallocable

We try to avoid mixing av_malloc with av_realloc, since av_malloc
may be implemented with functions that can't (formally) be mixed
with the functions used in av_realloc.
Signed-off-by: NMartin Storsjö <martin@martin.st>
上级 3c3b8003
......@@ -395,7 +395,7 @@ int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type,
int timestamp, int size)
{
if (size) {
pkt->data = av_malloc(size);
pkt->data = av_realloc(NULL, size);
if (!pkt->data)
return AVERROR(ENOMEM);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册