Commit bbe50a80 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'ff07ec14'

* commit 'ff07ec14':
  pcx: Return an error on broken palette if err_detect is set to 'explode'

Conflicts:
	libavcodec/pcx.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents c955bac7 ff07ec14
......@@ -165,7 +165,8 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (avpkt->size < 769) {
av_log(avctx, AV_LOG_ERROR, "File is too short\n");
ret = avpkt->size;
ret = avctx->err_recognition & AV_EF_EXPLODE ?
AVERROR_INVALIDDATA : avpkt->size;
goto end;
}
......@@ -180,7 +181,8 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
if (bytestream2_get_byte(&gb) != 12) {
av_log(avctx, AV_LOG_ERROR, "expected palette after image data\n");
ret = avpkt->size;
ret = avctx->err_recognition & AV_EF_EXPLODE ?
AVERROR_INVALIDDATA : avpkt->size;
goto end;
}
} else if (nplanes == 1) { /* all packed formats, max. 16 colors */
......
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