Commit 991db639 authored by Michael Niedermayer's avatar Michael Niedermayer

frame_thread_encoder: fix packet memleak

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d8246d47
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment