summaryrefslogtreecommitdiffstats
path: root/hacks/recanim.c
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-02 08:23:52 +0100
committerSimon Rettberg2020-12-02 08:23:52 +0100
commit2954208d00d422b34fa3a69631b0a091f17a349d (patch)
treeb4322e320155656af133b8f47025d00b17a68f64 /hacks/recanim.c
parentUpdate to 5.43 (diff)
downloadxscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.gz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.xz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.zip
5.44
Diffstat (limited to 'hacks/recanim.c')
-rw-r--r--hacks/recanim.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/hacks/recanim.c b/hacks/recanim.c
index 69bf385..bd88b4b 100644
--- a/hacks/recanim.c
+++ b/hacks/recanim.c
@@ -1,4 +1,4 @@
-/* recanim, Copyright (c) 2014-2018 Jamie Zawinski <jwz@jwz.org>
+/* recanim, Copyright (c) 2014-2020 Jamie Zawinski <jwz@jwz.org>
* Record animation frames of the running screenhack.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -427,7 +427,9 @@ screenhack_record_anim_free (record_anim_state *st)
st->fps, progname, type, st->fps);
if (soundtrack)
sprintf (cmd + strlen(cmd),
- " -i '%s' -map 0:v:0 -map 1:a:0 -acodec aac",
+ " -i '%s' -map 0:v:0 -map 1:a:0 -acodec aac"
+ /* Truncate or pad audio to length of video */
+ " -filter_complex '[1:0] apad' -shortest",
soundtrack);
sprintf (cmd + strlen(cmd),
" -c:v libx264"
@@ -439,7 +441,11 @@ screenhack_record_anim_free (record_anim_state *st)
/*" 2>&-"*/,
fn);
fprintf (stderr, "%s: exec: %s\n", progname, cmd);
- system (cmd);
+ /* Use empty body to kill warning from gcc -Wall with
+ "warning: ignoring return value of 'system',
+ declared with attribute warn_unused_result"
+ */
+ if (system (cmd)) {}
if (stat (fn, &s))
{