aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-from-video.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-15 17:15:47 +0100
committerMattias Andrée <maandree@kth.se>2017-01-15 17:15:47 +0100
commitd6c07e7fa021e13b5b9914cb15f13c711ecd387d (patch)
tree75fd767b2078a786c6bdb6729c45a63fd3b81979 /src/blind-from-video.c
parentblind-config: fix -j (diff)
downloadblind-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-from-video.c')
-rw-r--r--src/blind-from-video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blind-from-video.c b/src/blind-from-video.c
index 178ab17..f164195 100644
--- a/src/blind-from-video.c
+++ b/src/blind-from-video.c
@@ -258,7 +258,7 @@ main(int argc, char *argv[])
}
if (skip_length) {
- sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", frames, width, height, "xyza", 0, &headlen);
+ SPRINTF_HEAD_ZN(head, frames, width, height, "xyza", &headlen);
ewriteall(outfd, head, (size_t)headlen, outfile);
}
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
frames = length / frame_size;
if (!skip_length) {
- sprintf(head, "%zu %zu %zu %s\n%cuivf%zn", frames, width, height, "xyza", 0, &headlen);
+ SPRINTF_HEAD_ZN(head, frames, width, height, "xyza", &headlen);
ewriteall(outfd, head, (size_t)headlen, outfile);
data = mmap(0, length + (size_t)headlen, PROT_READ | PROT_WRITE, MAP_SHARED, outfd, 0);
memmove(data + headlen, data, length);