summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recordmydesktop/src/get_frame.c2
-rw-r--r--recordmydesktop/src/initialize_data.c3
-rw-r--r--recordmydesktop/src/rectinsert.c10
3 files changed, 10 insertions, 5 deletions
diff --git a/recordmydesktop/src/get_frame.c b/recordmydesktop/src/get_frame.c
index 16eef83..0f934b8 100644
--- a/recordmydesktop/src/get_frame.c
+++ b/recordmydesktop/src/get_frame.c
@@ -245,6 +245,8 @@ void *GetFrame(ProgData *pdata){
pdata->shm_opcode,
pdata->args.no_quick_subsample);
BlocksFromList(&pdata->rect_root[tlist_sel],
+ pdata->brwin.rgeom.x,
+ pdata->brwin.rgeom.y,
pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH,
pdata->enc_data->yuv.y_height/Y_UNIT_WIDTH);
pthread_mutex_unlock(&pdata->yuv_mutex);
diff --git a/recordmydesktop/src/initialize_data.c b/recordmydesktop/src/initialize_data.c
index 2ceb026..69cfad0 100644
--- a/recordmydesktop/src/initialize_data.c
+++ b/recordmydesktop/src/initialize_data.c
@@ -58,7 +58,8 @@ int InitializeData(ProgData *pdata,
&pdata->npxl);
pdata->dummy_p_size=16;
}
-
+ else
+ pdata->dummy_p_size=0;
pdata->rect_root[0]=pdata->rect_root[1]=NULL;
diff --git a/recordmydesktop/src/rectinsert.c b/recordmydesktop/src/rectinsert.c
index b46ec1f..10d9841 100644
--- a/recordmydesktop/src/rectinsert.c
+++ b/recordmydesktop/src/rectinsert.c
@@ -512,6 +512,8 @@ void ClearList(RectArea **root){
}
void BlocksFromList(RectArea **root,
+ unsigned int x_offset,
+ unsigned int y_offset,
unsigned int blocknum_x,
unsigned int blocknum_y){
@@ -529,10 +531,10 @@ void BlocksFromList(RectArea **root,
}
while(temp!=NULL){
- column_start=temp->geom.x/Y_UNIT_WIDTH;
- column_end=(temp->geom.x+temp->geom.width)/Y_UNIT_WIDTH;
- row_start=temp->geom.y/Y_UNIT_WIDTH;
- row_end=(temp->geom.y+temp->geom.height)/Y_UNIT_WIDTH;
+ column_start=(temp->geom.x-x_offset)/Y_UNIT_WIDTH;
+ column_end=(temp->geom.x+temp->geom.width-x_offset)/Y_UNIT_WIDTH;
+ row_start=(temp->geom.y-y_offset)/Y_UNIT_WIDTH;
+ row_end=(temp->geom.y+temp->geom.height-y_offset)/Y_UNIT_WIDTH;
for(i=row_start;i<row_end+1;i++){
for(j=column_start;j<column_end+1;j++){
blockno=i*blocknum_x+j;
© All Rights Reserved