[FFmpeg-cvslog] avformat/apngenc: use av_packet_alloc()

James Almer git at videolan.org
Sat Sep 23 08:20:27 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Sep 23 02:15:16 2017 -0300| [bb4b7624d9dd17dcda44703d5d69292a85fe2d4d] | committer: James Almer

avformat/apngenc: use av_packet_alloc()

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb4b7624d9dd17dcda44703d5d69292a85fe2d4d
---

 libavformat/apngenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c
index 378a9b3b36..d4191c02cc 100644
--- a/libavformat/apngenc.c
+++ b/libavformat/apngenc.c
@@ -228,7 +228,7 @@ static int apng_write_packet(AVFormatContext *format_context, AVPacket *packet)
     int ret;
 
     if (!apng->prev_packet) {
-        apng->prev_packet = av_malloc(sizeof(*apng->prev_packet));
+        apng->prev_packet = av_packet_alloc();
         if (!apng->prev_packet)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list