summaryrefslogtreecommitdiff
path: root/libavformat/rtmppkt.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-11-24 10:41:34 +0200
committerMartin Storsjö <martin@martin.st>2014-11-28 09:59:28 +0200
commit44127b157e9f8acb837d4bb3a094f56b40da3ef5 (patch)
tree09b3113ef81020839f172d91b186644332c95111 /libavformat/rtmppkt.c
parent3c3b8003a13d9c3668c0bb6d79d2376da3b2b352 (diff)
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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtmppkt.c')
-rw-r--r--libavformat/rtmppkt.c2
1 files changed, 1 insertions, 1 deletions
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);
}