Currently, inputting scale values like -1 x 320 will throw bad range error.
According to https://trac.ffmpeg.org/wiki/Scaling, ffmpeg -i input.jpg -vf scale=320:-1 output_320.png is a valid command and a recommended way for keeping aspect ratio after scaling as well.
You can just omit value to get the same behavior as -1.
If I remember correctly negative values are not allowed intentionally, to simplify getFinalWidth and getFinalHeight routines.
Currently, inputting scale values like -1 x 320 will throw bad range error. According to https://trac.ffmpeg.org/wiki/Scaling,
ffmpeg -i input.jpg -vf scale=320:-1 output_320.png
is a valid command and a recommended way for keeping aspect ratio after scaling as well.