mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-04 01:36:07 +00:00
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>
This commit is contained in:
parent
3c3b8003a1
commit
44127b157e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user