dxa: Make sure the reference frame exists
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 5ef7c84a93)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/dxa.c
This commit is contained in:
committed by
Sean McGovern
parent
91355bec88
commit
86c169c5b6
@@ -255,6 +255,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
case 5:
|
case 5:
|
||||||
c->pic.key_frame = !(compr & 1);
|
c->pic.key_frame = !(compr & 1);
|
||||||
c->pic.pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
|
c->pic.pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
|
||||||
|
|
||||||
|
if (!tmpptr && !c->pic.key_frame) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
for(j = 0; j < avctx->height; j++){
|
for(j = 0; j < avctx->height; j++){
|
||||||
if(compr & 1){
|
if(compr & 1){
|
||||||
for(i = 0; i < avctx->width; i++)
|
for(i = 0; i < avctx->width; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user