mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-06 20:47:41 +00:00
png: make sure the previous frames dimensions match before using it as reference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a9e7e98021
commit
c7dc19d68f
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user