mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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:
parent
0a029906b2
commit
b4e7fc4b4b
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue