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

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


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

avformat/gif: use av_packet_alloc()

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

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

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

diff --git a/libavformat/gif.c b/libavformat/gif.c
index 91cd40db5c..d6113dbc85 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -186,7 +186,7 @@ static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
     AVStream *video_st = s->streams[0];
 
     if (!gif->prev_pkt) {
-        gif->prev_pkt = av_malloc(sizeof(*gif->prev_pkt));
+        gif->prev_pkt = av_packet_alloc();
         if (!gif->prev_pkt)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list