From a5f8417db587f54daae0340fc88f684cb41d020c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 29 Apr 2012 15:56:12 +0200 Subject: xbmdec: fix decoding when variable name contains an 'x'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes trac ticket #1142. Signed-off-by: Reimar Döffinger --- libavcodec/xbmdec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/xbmdec.c') diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c index 629a636e6a..b3e4cf2f89 100644 --- a/libavcodec/xbmdec.c +++ b/libavcodec/xbmdec.c @@ -83,6 +83,9 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data, if ((ret = avctx->get_buffer(avctx, p)) < 0) return ret; + // goto start of image data + ptr += strcspn(ptr, "{") + 1; + linesize = (avctx->width + 7) / 8; for (i = 0; i < avctx->height; i++) { dst = p->data[0] + i * p->linesize[0]; -- cgit v1.2.1