avcodec/frame_thread_encoder: use av_packet_alloc()
authorJames Almer <jamrial@gmail.com>
Sat, 23 Sep 2017 20:50:58 +0000 (17:50 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 23 Sep 2017 20:52:32 +0000 (17:52 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/frame_thread_encoder.c

index ffbf5ca..215aee9 100644 (file)
@@ -70,7 +70,7 @@ static void * attribute_align_arg worker(void *v){
         AVFrame *frame;
         Task task;
 
-        if(!pkt) pkt= av_mallocz(sizeof(*pkt));
+        if(!pkt) pkt = av_packet_alloc();
         if(!pkt) continue;
         av_init_packet(pkt);