diracdec: Use only one frame per reference
Prevents null ptr dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c0aff4064d
commit
0a4087b893
@ -1665,6 +1665,7 @@ static int dirac_decode_picture_header(DiracContext *s)
|
|||||||
if (!s->all_frames[j].avframe.data[0]) {
|
if (!s->all_frames[j].avframe.data[0]) {
|
||||||
s->ref_pics[i] = &s->all_frames[j];
|
s->ref_pics[i] = &s->all_frames[j];
|
||||||
s->avctx->get_buffer(s->avctx, &s->ref_pics[i]->avframe);
|
s->avctx->get_buffer(s->avctx, &s->ref_pics[i]->avframe);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user