From 1da186676738dbded75a83d72f0739b993970d4e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 28 Mar 2014 05:34:25 +0100 Subject: [PATCH] avcodec/xbmdec: support X10 format Signed-off-by: Michael Niedermayer --- libavcodec/xbmdec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c index 52b41ee813..203c2f9cbe 100644 --- a/libavcodec/xbmdec.c +++ b/libavcodec/xbmdec.c @@ -95,6 +95,13 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data, if (av_isxdigit(*ptr)) val = (val << 4) + convert(*ptr++); *dst++ = ff_reverse[val]; + if (av_isxdigit(*ptr) && j+1 < linesize) { + j++; + val = convert(*ptr++); + if (av_isxdigit(*ptr)) + val = (val << 4) + convert(*ptr++); + *dst++ = ff_reverse[val]; + } } else { av_log(avctx, AV_LOG_ERROR, "Unexpected data at %.8s.\n", ptr);