aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/xan.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-17 19:14:11 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-04-17 19:14:11 +0000
commite5986d0427818bbdfceec3c8db2ff0a755275959 (patch)
treebcdcb9d6a3eac9e0fecf6b2c466d9f3e22d710ed /libavcodec/xan.c
parent16cc5a738c31fdec1bdd6cadec8b30b825344e9f (diff)
downloadffmpeg-e5986d0427818bbdfceec3c8db2ff0a755275959.tar.gz
Cosmetics to improve xan_unpack readability
Originally committed as revision 18590 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r--libavcodec/xan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 04f2b1f249..8a7ad240ad 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -140,22 +140,22 @@ static void xan_unpack(unsigned char *dest, const unsigned char *src, int dest_l
size = opcode & 3;
+ back = ((opcode & 0x60) << 3) + *src++ + 1;
size2 = ((opcode & 0x1c) >> 2) + 3;
- back = ((opcode & 0x60) << 3) + *src++ + 1;
} else if ( (opcode & 0x40) == 0 ) {
size = *src >> 6;
+ back = (bytestream_get_be16(&src) & 0x3fff) + 1;
size2 = (opcode & 0x3f) + 4;
- back = (bytestream_get_be16(&src) & 0x3fff) + 1;
} else {
size = opcode & 3;
- back = ((opcode & 0x10) << 12) + 1 + bytestream_get_be16(&src);
- size2 = *src++ + 5 + ((opcode & 0xc) << 6);
+ back = ((opcode & 0x10) << 12) + bytestream_get_be16(&src) + 1;
+ size2 = ((opcode & 0x0c) << 6) + *src++ + 5;
if (size + size2 > dest_end - dest)
return;
}