mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
mimic: Fix race condition
Fixes access after free. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8ef453ff83
commit
500220a8e8
@ -175,7 +175,7 @@ static int mimic_decode_update_thread_context(AVCodecContext *avctx, const AVCod
|
||||
|
||||
for (i = 0; i < FF_ARRAY_ELEMS(dst->frames); i++) {
|
||||
ff_thread_release_buffer(avctx, &dst->frames[i]);
|
||||
if (src->frames[i].f->data[0]) {
|
||||
if (i != src->next_cur_index && src->frames[i].f->data[0]) {
|
||||
ret = ff_thread_ref_frame(&dst->frames[i], &src->frames[i]);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user