fftools/ffmpeg_opt: Fix signed integer overflow