aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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