diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-05 23:14:44 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-05 23:14:44 +0400 |
commit | 64b8e620cbbe3d2f726ccfa80323876b8f8bfc5c (patch) | |
tree | 8e27057f8a5243cf14b42262824229d943d5b4f7 /libavcodec/xan.c | |
parent | bb9910877564055f01a10d6fe55637bb456c6554 (diff) |
Slightly simplify detection of end of compressed data in xan_unpack
Originally committed as revision 19772 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r-- | libavcodec/xan.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 91c22c3d2f..c2d4007ccb 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -156,12 +156,8 @@ static void xan_unpack(unsigned char *dest, const unsigned char *src, int dest_l av_memcpy_backptr(dest, back, size2); dest += size2; } else { - int finish; - size = ((opcode & 0x1f) << 2) + 4; - - finish = size > 0x70; - if (finish) - size = opcode & 3; + int finish = opcode >= 0xfc; + size = finish ? opcode & 3 : ((opcode & 0x1f) << 2) + 4; memcpy(dest, src, size); dest += size; src += size; if (finish) |