aboutsummaryrefslogtreecommitdiffstats
path: root/make-gif
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2017-04-21 16:59:51 -0700
committerkatherine <shmibs@shmibbles.me>2017-04-21 16:59:51 -0700
commit1dad79dce56e15fa133d21111a89e3c1d55b163d (patch)
tree23baafd20b40b2428c4b832d86445a10810fe2f0 /make-gif
parentf8d771bfdf924b424724134efe9db9e7e6d2262c (diff)
downloadmake-gif-1dad79dce56e15fa133d21111a89e3c1d55b163d.tar.gz
update aspect-ratio logicHEADmaster
Diffstat (limited to 'make-gif')
-rwxr-xr-xmake-gif3
1 files changed, 2 insertions, 1 deletions
diff --git a/make-gif b/make-gif
index ed766f6..b158f0d 100755
--- a/make-gif
+++ b/make-gif
@@ -164,7 +164,8 @@ height=-1
ffprobe -loglevel -8 -print_format json -show_streams "${tmp_pref}-in" \
| grep -m 1 display_aspect_ratio | grep -Eo '[0-9]+:[0-9]+' \
| IFS=':' read -A as
-[[ -z $as ]] || let "height = ${width} * ${as[2]} / ${as[1]}"
+[[ -z $as ]] || [[ ${as[1]} -eq 0 ]] || [[ ${as[2]} -eq 0 ]] \
+ || let "height = (${width} * ${as[2]}) / ${as[1]}"
# convenience var
local substr