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:
@@ -58,7 +58,7 @@ static void get_packet_defaults(AVPacket *pkt)
|
|||||||
|
|
||||||
AVPacket *av_packet_alloc(void)
|
AVPacket *av_packet_alloc(void)
|
||||||
{
|
{
|
||||||
AVPacket *pkt = av_mallocz(sizeof(AVPacket));
|
AVPacket *pkt = av_malloc(sizeof(AVPacket));
|
||||||
if (!pkt)
|
if (!pkt)
|
||||||
return pkt;
|
return pkt;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user