summaryrefslogtreecommitdiff
path: root/libavcodec/xbmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-28 05:34:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-28 05:34:25 +0100
commit1da186676738dbded75a83d72f0739b993970d4e (patch)
tree02896302058bdfd65595840067ba1a16e1992a77 /libavcodec/xbmdec.c
parent4618084a5cdd1920524a9eeba131e3658a2e6488 (diff)
downloadffmpeg-1da186676738dbded75a83d72f0739b993970d4e.tar.gz
avcodec/xbmdec: support X10 format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/xbmdec.c')
-rw-r--r--libavcodec/xbmdec.c7
1 files changed, 7 insertions, 0 deletions
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);