From 6b998b5ed066aeece1146fe245b35965319b3cbd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 10 May 2017 16:59:26 +0200 Subject: Cleaner code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-concat.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/blind-concat.c') diff --git a/src/blind-concat.c b/src/blind-concat.c index 53707e7..a323af8 100644 --- a/src/blind-concat.c +++ b/src/blind-concat.c @@ -6,11 +6,7 @@ # include #endif #include -#include -#include -#include #include -#include USAGE("[-o output-file [-j jobs]] first-stream ... last-stream") @@ -104,7 +100,7 @@ concat_to_file_parallel(int argc, char *argv[], char *output_file, size_t jobs) struct stream *streams; size_t *ptrs; char head[STREAM_HEAD_MAX]; - size_t ptr, frame_size, frames = 0, next = 0, j; + size_t ptr, frames = 0, next = 0, j; ssize_t headlen; int fd, i, n, pollfd; @@ -127,12 +123,11 @@ concat_to_file_parallel(int argc, char *argv[], char *output_file, size_t jobs) SPRINTF_HEAD_ZN(head, frames, streams->width, streams->height, streams->pixfmt, &headlen); - echeck_frame_size(streams->width, streams->height, streams->pixel_size, 0, output_file); - frame_size = streams->width * streams->height * streams->pixel_size; + echeck_dimensions(streams, WIDTH | HEIGHT, NULL); ptr = (size_t)headlen; for (i = 0; i < argc; i++) { ptrs[i] = ptr; - ptr += streams->frames * frame_size; + ptr += streams->frames * streams->frame_size; } if (ftruncate(fd, (off_t)ptr)) eprintf("ftruncate %s:", output_file); -- cgit v1.2.3-70-g09d2