summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/rmd_get_frame.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-06-19 00:08:37 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-06-20 15:52:09 -0700
commitc903c20a8554bd5a56fbe95f6598662e9fc0d2b6 (patch)
tree29428ad50ce477ad2cc5a909a65be36a9d360830 /recordmydesktop/src/rmd_get_frame.c
parentb9cdf698172eed38422c58b1ce5664dadfa08829 (diff)
get_frame: eliminate pointless pxl_data pointers
Just cleaning up some junk while trying to make sense of this mess
Diffstat (limited to 'recordmydesktop/src/rmd_get_frame.c')
-rw-r--r--recordmydesktop/src/rmd_get_frame.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c
index b4ce53c..a14b111 100644
--- a/recordmydesktop/src/rmd_get_frame.c
+++ b/recordmydesktop/src/rmd_get_frame.c
@@ -198,19 +198,19 @@
//initialize the structures and memory.
static int rmdFirstFrame(ProgData *pdata,
XImage **image,
- XShmSegmentInfo *shminfo,
- char **pxl_data) {
+ XShmSegmentInfo *shminfo) {
if((pdata->args.noshared)){
+ char *pxl_data;
- *pxl_data=(char *)malloc(pdata->brwin.nbytes);
+ pxl_data=(char *)malloc(pdata->brwin.nbytes);
(*image)=XCreateImage(pdata->dpy,
pdata->specs.visual,
pdata->specs.depth,
ZPixmap,
0,
- *pxl_data,
+ pxl_data,
pdata->brwin.rrect.width,
pdata->brwin.rrect.height,
8,
@@ -228,7 +228,7 @@ static int rmdFirstFrame(ProgData *pdata,
pdata->specs.visual,
pdata->specs.depth,
ZPixmap,
- *pxl_data,
+ NULL,
shminfo,
pdata->brwin.rrect.width,
pdata->brwin.rrect.height);
@@ -369,14 +369,10 @@ void *rmdGetFrame(ProgData *pdata){
XShmSegmentInfo shminfo,shminfo_back;//info structure for the image above.
int init_img1=0,init_img2=0,
img_sel,d_buff;
- char *pxl_data=NULL,*pxl_data_back=NULL;
-
-
-
img_sel=d_buff=pdata->args.full_shots;
- if((init_img1=rmdFirstFrame(pdata,&image,&shminfo,&pxl_data)!=0)){
+ if((init_img1=rmdFirstFrame(pdata,&image,&shminfo)!=0)){
if(pdata->args.encOnTheFly){
if(remove(pdata->args.filename)){
perror("Error while removing file:\n");
@@ -392,8 +388,7 @@ void *rmdGetFrame(ProgData *pdata){
exit(init_img1);
}
if(d_buff){
- if((init_img2=rmdFirstFrame(pdata,&image_back,&shminfo_back,
- &pxl_data_back)!=0)){
+ if((init_img2=rmdFirstFrame(pdata,&image_back,&shminfo_back)!=0)){
if(pdata->args.encOnTheFly){
if(remove(pdata->args.filename)){
perror("Error while removing file:\n");
© All Rights Reserved