[FFmpeg-cvslog] r19772 - trunk/libavcodec/xan.c

reimar subversion
Sat Sep 5 21:14:44 CEST 2009


Author: reimar
Date: Sat Sep  5 21:14:44 2009
New Revision: 19772

Log:
Slightly simplify detection of end of compressed data in xan_unpack

Modified:
   trunk/libavcodec/xan.c

Modified: trunk/libavcodec/xan.c
==============================================================================
--- trunk/libavcodec/xan.c	Sat Sep  5 19:28:20 2009	(r19771)
+++ trunk/libavcodec/xan.c	Sat Sep  5 21:14:44 2009	(r19772)
@@ -156,12 +156,8 @@ static void xan_unpack(unsigned char *de
             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)



More information about the ffmpeg-cvslog mailing list