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.
---
 libavformat/rtmppkt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 37fbb5f..e952091 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);
     }
-- 
1.9.3 (Apple Git-50)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to