Browse Source

Slightly simplify detection of end of compressed data in xan_unpack

Originally committed as revision 19772 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Reimar Döffinger 15 years ago
parent
commit
64b8e620cb
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      libavcodec/xan.c

+ 2
- 6
libavcodec/xan.c View File

@@ -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)


Loading…
Cancel
Save