diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-01-15 17:15:47 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-01-15 17:15:47 +0100 |
| commit | d6c07e7fa021e13b5b9914cb15f13c711ecd387d (patch) | |
| tree | 75fd767b2078a786c6bdb6729c45a63fd3b81979 /src/blind-concat.c | |
| parent | blind-config: fix -j (diff) | |
| download | blind-d6c07e7fa021e13b5b9914cb15f13c711ecd387d.tar.gz blind-d6c07e7fa021e13b5b9914cb15f13c711ecd387d.tar.bz2 blind-d6c07e7fa021e13b5b9914cb15f13c711ecd387d.tar.xz | |
Use macros to write the head
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-concat.c')
| -rw-r--r-- | src/blind-concat.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/blind-concat.c b/src/blind-concat.c index bea127a..f6fe504 100644 --- a/src/blind-concat.c +++ b/src/blind-concat.c @@ -80,9 +80,7 @@ concat_to_file(int argc, char *argv[], char *output_file) close(stream.fd); } - sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", - stream.frames, stream.width, stream.height, stream.pixfmt, 0, &headlen); - + SPRINTF_HEAD_ZN(head, stream.frames, stream.width, stream.height, stream.pixfmt, &headlen); ewriteall(fd, head, (size_t)headlen, output_file); data = mmap(0, size + (size_t)headlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); @@ -131,8 +129,7 @@ concat_to_file_parallel(int argc, char *argv[], char *output_file, size_t jobs) frames += streams[i].frames; } - sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", - frames, streams->width, streams->height, streams->pixfmt, 0, &headlen); + 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; |
