summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recordmydesktop/src/cache_frame.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/recordmydesktop/src/cache_frame.c b/recordmydesktop/src/cache_frame.c
index 7f8c826..725a1df 100644
--- a/recordmydesktop/src/cache_frame.c
+++ b/recordmydesktop/src/cache_frame.c
@@ -35,12 +35,10 @@ int CompareBlocks(unsigned char *incoming,unsigned char *old,int blockno,int wid
*old_reg=&(old[block_i*(width*height/divisor)+block_k*width/divisor]);
for(j=0;j<height/divisor;j++){
- for(i=0;i<width/divisor;i++){
- if((*(incoming_reg++))!=(*(old_reg++)))
- return 1;
- }
- incoming_reg+=(width-width/divisor);
- old_reg+=(width-width/divisor);
+ if(memcmp(incoming_reg,old_reg,width/divisor))
+ return 1;
+ incoming_reg+=width;
+ old_reg+=width;
}
return 0;
© All Rights Reserved