# HG changeset patch # User reimar # Date 1252178084 0 # Node ID 1d71688b454901d437b9c5d9595446870047b799 # Parent 45cb3db81201d8a8a7a1e424ca29a865ab0e3969 Slightly simplify detection of end of compressed data in xan_unpack diff -r 45cb3db81201 -r 1d71688b4549 xan.c --- a/xan.c Sat Sep 05 17:28:20 2009 +0000 +++ b/xan.c Sat Sep 05 19:14:44 2009 +0000 @@ -156,12 +156,8 @@ 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)