summaryrefslogtreecommitdiffstats
path: root/hacks/recanim.c
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-02 08:35:55 +0100
committerSimon Rettberg2020-12-02 08:35:55 +0100
commite5319b91d163384ee22db077b2d37688d65646c9 (patch)
tree04acbf822516634814098b38a9878ffc1a55529d /hacks/recanim.c
parentdriver/timers.c: fix flush_events() (diff)
parent5.44 (diff)
downloadxscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.tar.gz
xscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.tar.xz
xscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.zip
Merge branch 'master' into openslx
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))
{