|
|
@ -481,7 +481,7 @@ weston_recorder_create(struct weston_output *output, const char *filename) |
|
|
|
|
|
|
|
|
|
|
|
do_yflip = !!(compositor->capabilities & WESTON_CAP_CAPTURE_YFLIP); |
|
|
|
do_yflip = !!(compositor->capabilities & WESTON_CAP_CAPTURE_YFLIP); |
|
|
|
|
|
|
|
|
|
|
|
recorder = malloc(sizeof *recorder); |
|
|
|
recorder = zalloc(sizeof *recorder); |
|
|
|
if (recorder == NULL) { |
|
|
|
if (recorder == NULL) { |
|
|
|
weston_log("%s: out of memory\n", __func__); |
|
|
|
weston_log("%s: out of memory\n", __func__); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -491,9 +491,6 @@ weston_recorder_create(struct weston_output *output, const char *filename) |
|
|
|
size = stride * 4 * output->current_mode->height; |
|
|
|
size = stride * 4 * output->current_mode->height; |
|
|
|
recorder->frame = zalloc(size); |
|
|
|
recorder->frame = zalloc(size); |
|
|
|
recorder->rect = malloc(size); |
|
|
|
recorder->rect = malloc(size); |
|
|
|
recorder->total = 0; |
|
|
|
|
|
|
|
recorder->count = 0; |
|
|
|
|
|
|
|
recorder->destroying = 0; |
|
|
|
|
|
|
|
recorder->output = output; |
|
|
|
recorder->output = output; |
|
|
|
|
|
|
|
|
|
|
|
if ((recorder->frame == NULL) || (recorder->rect == NULL)) { |
|
|
|
if ((recorder->frame == NULL) || (recorder->rect == NULL)) { |
|
|
@ -502,9 +499,7 @@ weston_recorder_create(struct weston_output *output, const char *filename) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (do_yflip) |
|
|
|
if (!do_yflip) |
|
|
|
recorder->tmpbuf = NULL; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
recorder->tmpbuf = malloc(size); |
|
|
|
recorder->tmpbuf = malloc(size); |
|
|
|
|
|
|
|
|
|
|
|
header.magic = WCAP_HEADER_MAGIC; |
|
|
|
header.magic = WCAP_HEADER_MAGIC; |
|
|
|