mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
avcodec/pngdec: Require a IHDR chunk before fctl
This is required by the APNG spec Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
47f4e2d896
commit
a1736926e9
@ -824,6 +824,11 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
|
||||
if (length != 26)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (!(s->state & PNG_IHDR)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "fctl before IHDR\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
s->last_w = s->cur_w;
|
||||
s->last_h = s->cur_h;
|
||||
s->last_x_offset = s->x_offset;
|
||||
|
Loading…
Reference in New Issue
Block a user