mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
frame_thread_encoder: fix packet memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d8246d475c
commit
991db63951
@ -259,7 +259,7 @@ int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVF
|
||||
}
|
||||
task = c->finished_tasks[c->finished_task_index];
|
||||
*pkt = *(AVPacket*)(task.outdata);
|
||||
c->finished_tasks[c->finished_task_index].outdata= NULL;
|
||||
av_freep(&c->finished_tasks[c->finished_task_index].outdata);
|
||||
c->finished_task_index = (c->finished_task_index+1) % BUFFER_SIZE;
|
||||
pthread_mutex_unlock(&c->finished_task_mutex);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user