diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-12-10 21:31:18 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-12-10 21:31:18 +0100 |
commit | 00502370f6bef3f40de2685a4d2ee2c1ec960da8 (patch) | |
tree | 8769f42a7d6743156b5c94ec60ad66dc4120316c /libavcodec | |
parent | 6a20876b6203196eeb2cf3d4a4a0aaa67f00a781 (diff) | |
download | ffmpeg-00502370f6bef3f40de2685a4d2ee2c1ec960da8.tar.gz |
avcodec/xpmdec: fix small artifacts
The max size of uint8_t subset is 223 not 220.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/xpmdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c index 1aa40c0655..acde9e768d 100644 --- a/libavcodec/xpmdec.c +++ b/libavcodec/xpmdec.c @@ -293,7 +293,7 @@ static int ascii2index(const uint8_t *cpixel, int cpp) if (*p < ' ' || *p > 0xfe) return AVERROR_INVALIDDATA; n += (*p++ - ' ') * m; - m *= 220; + m *= 223; } return n; } @@ -346,7 +346,7 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data, size = 1; for (i = 0; i < cpp; i++) - size *= 220; + size *= 223; if (ncolors <= 0 || ncolors > size) { av_log(avctx, AV_LOG_ERROR, "invalid number of colors: %d\n", ncolors); |