summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/cache_frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop/src/cache_frame.c')
-rw-r--r--recordmydesktop/src/cache_frame.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/recordmydesktop/src/cache_frame.c b/recordmydesktop/src/cache_frame.c
index d4260e3..ae33bba 100644
--- a/recordmydesktop/src/cache_frame.c
+++ b/recordmydesktop/src/cache_frame.c
@@ -251,15 +251,16 @@ void *CacheImageBuffer(ProgData *pdata){
total_bytes+=(nbytes>>20);
total_received_bytes=((frameno*((pdata->specs.depth>=24)?4:2)*
pdata->brwin.rgeom.width*pdata->brwin.rgeom.height)>>20);
- fprintf(stderr,"\n*********************************************\n"
- "\nCached %d MB, from %d MB that were received.\n"
- "Average cache compression ratio: %u %%\n"
- "\n*********************************************\n",
- total_bytes,
- total_received_bytes,
- (total_bytes*100)/total_received_bytes
- );
+ if(total_received_bytes){
+ fprintf(stderr,"\n*********************************************\n"
+ "\nCached %d MB, from %d MB that were received.\n"
+ "Average cache compression ratio: %u %%\n"
+ "\n*********************************************\n",
+ total_bytes,
+ total_received_bytes,
+ (total_bytes*100)/total_received_bytes);
+ }
fprintf(stderr,"Saved %d frames in a total of %d requests\n",
frameno,frames_total);fflush(stderr);
© All Rights Reserved