From 44127b157e9f8acb837d4bb3a094f56b40da3ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 24 Nov 2014 10:41:34 +0200 Subject: [PATCH] rtmppkt: Make pkt->data reallocable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Martin Storsjö --- libavformat/rtmppkt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index 37fbb5fc16..e952091714 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -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); }