avcodec/avpacket: use av_malloc() to allocate an AVPacket

av_mallocz() is superfluous as get_packet_defaults() is called immediately
after it's allocated, which will initialize the entire struct to default
values.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-05-08 18:36:28 -03:00
parent 0a029906b2
commit b4e7fc4b4b

View File

@ -58,7 +58,7 @@ static void get_packet_defaults(AVPacket *pkt)
AVPacket *av_packet_alloc(void)
{
AVPacket *pkt = av_mallocz(sizeof(AVPacket));
AVPacket *pkt = av_malloc(sizeof(AVPacket));
if (!pkt)
return pkt;