projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb99108
)
Slightly simplify detection of end of compressed data in xan_unpack
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 5 Sep 2009 19:14:44 +0000
(19:14 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 5 Sep 2009 19:14:44 +0000
(19:14 +0000)
Originally committed as revision 19772 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/xan.c
patch
|
blob
|
history
diff --git
a/libavcodec/xan.c
b/libavcodec/xan.c
index 91c22c3d2fdbcb852122bfbe78d24c64aa7b40ba..c2d4007ccb83b181886462f085dca3f87304757f 100644
(file)
--- 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)