[SCM] libav/experimental: Slightly simplify detection of end of compressed data in xan_unpack
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:50:46 UTC 2013
The following commit has been merged in the experimental branch:
commit 64b8e620cbbe3d2f726ccfa80323876b8f8bfc5c
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Sat Sep 5 19:14:44 2009 +0000
Slightly simplify detection of end of compressed data in xan_unpack
Originally committed as revision 19772 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 91c22c3..c2d4007 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)
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list