commit b26cb05e52c831be2b72df41a2cd9b92a754e927
parent a1e6eee26bd30a1b02d7bb002ae8605d317b05cd
Author: Mattias Andrée <maandree@kth.se>
Date: Mon, 9 Jan 2017 05:34:24 +0100
vu-repeat: fix frame count in output
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/vu-repeat.c b/src/vu-repeat.c
@@ -37,6 +37,9 @@ main(int argc, char *argv[])
if (stream.fd < 0)
eprintf("open %s:", stream.file);
einit_stream(&stream);
+ if (stream->frame > SIZE_MAX / count)
+ eprintf("%s: video too long\n", stream.file);
+ stream->frame *= count;
fprint_stream_head(stdout, &stream);
fflush(stdout);
if (ferror(stdout))