Make avcodec_check_dimensions() return AVERROR(EINVAL) rather than -1