Commit c7dc19d6 authored by Michael Niedermayer's avatar Michael Niedermayer

png: make sure the previous frames dimensions match before using it as reference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a9e7e980
......@@ -675,7 +675,10 @@ static int decode_frame(AVCodecContext *avctx,
/* handle p-frames only if a predecessor frame is available */
if(s->last_picture->data[0] != NULL) {
if(!(avpkt->flags & AV_PKT_FLAG_KEY)) {
if( !(avpkt->flags & AV_PKT_FLAG_KEY)
&& s->last_picture->width == s->current_picture->width
&& s->last_picture->height== s->current_picture->height
) {
int i, j;
uint8_t *pd = s->current_picture->data[0];
uint8_t *pd_last = s->last_picture->data[0];
......
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