Commit 12eb2fd5 authored by Michael Niedermayer's avatar Michael Niedermayer

dxa: dont try to use the previous frame if there is none.

Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e70144cb
...@@ -256,7 +256,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac ...@@ -256,7 +256,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
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;
for(j = 0; j < avctx->height; j++){ for(j = 0; j < avctx->height; j++){
if(compr & 1){ if((compr & 1) && tmpptr){
for(i = 0; i < avctx->width; i++) for(i = 0; i < avctx->width; i++)
outptr[i] = srcptr[i] ^ tmpptr[i]; outptr[i] = srcptr[i] ^ tmpptr[i];
tmpptr += stride; tmpptr += stride;
......
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