The packet was allocated with av_packet_alloc(), so it's redundant.
Signed-off-by: James Almer <[email protected]>
---
libavcodec/frame_thread_encoder.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/frame_thread_encoder.c
b/libavcodec/frame_thread_encoder.c
index 83229f620a..9ae9d72934 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -72,7 +72,6 @@ static void * attribute_align_arg worker(void *v){
if(!pkt) pkt = av_packet_alloc();
if(!pkt) continue;
- av_init_packet(pkt);
pthread_mutex_lock(&c->task_fifo_mutex);
while (av_fifo_size(c->task_fifo) <= 0 || atomic_load(&c->exit)) {
@@ -107,7 +106,7 @@ static void * attribute_align_arg worker(void *v){
pthread_mutex_unlock(&c->finished_task_mutex);
}
end:
- av_free(pkt);
+ av_packet_free(&pkt);
pthread_mutex_lock(&c->buffer_mutex);
avcodec_close(avctx);
pthread_mutex_unlock(&c->buffer_mutex);
--
2.30.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".